source: branches/alma/src/STWriter.h@ 2844

Last change on this file since 2844 was 1757, checked in by Kana Sugimoto, 14 years ago

New Development: Yes

JIRA Issue: Yes (CAS-2211)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: ASAP 3.0.0 interface changes

Test Programs:

Put in Release Notes: Yes

Module(s): all the CASA sd tools and tasks are affected.

Description: Merged ATNF-ASAP 3.0.0 developments to CASA (alma) branch.

Note you also need to update casa/code/atnf.


  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
RevLine 
[28]1//#---------------------------------------------------------------------------
[822]2//# STWriter.h: ASAP class to write out single dish spectra.
[28]3//#---------------------------------------------------------------------------
4//# Copyright (C) 2004
[125]5//# ATNF
[28]6//#
7//# This program is free software; you can redistribute it and/or modify it
8//# under the terms of the GNU General Public License as published by the Free
9//# Software Foundation; either version 2 of the License, or (at your option)
10//# any later version.
11//#
12//# This program is distributed in the hope that it will be useful, but
13//# WITHOUT ANY WARRANTY; without even the implied warranty of
14//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
15//# Public License for more details.
16//#
17//# You should have received a copy of the GNU General Public License along
18//# with this program; if not, write to the Free Software Foundation, Inc.,
19//# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
20//#
21//# Correspondence concerning this software should be addressed as follows:
22//# Internet email: Malte.Marquarding@csiro.au
23//# Postal address: Malte Marquarding,
24//# Australia Telescope National Facility,
25//# P.O. Box 76,
26//# Epping, NSW, 2121,
27//# AUSTRALIA
28//#
29//# $Id: STWriter.h 1757 2010-06-09 09:03:06Z KanaSugimoto $
30//#---------------------------------------------------------------------------
[822]31#ifndef STWRITER_H
32#define STWRITER_H
[28]33
34#include <string>
35
[81]36#include <casa/aips.h>
37#include <casa/Utilities/CountedPtr.h>
[1757]38#include <casa/BasicSL/String.h>
[28]39
[894]40#include "Logger.h"
[827]41#include "Scantable.h"
[28]42
43class PKSwriter;
[827]44class casa::Table;
[28]45
[83]46namespace asap {
[848]47/**
48 * This exports the ASAP internal data format to othe formats,
49 * such as "SDFITS", "FITS", "MS2" or "ASCII"
50 *
[894]51 * @brief Export of ASAP data container into foreign formats
[848]52 * @author Malte Marquarding
[988]53 * @date 2006-03-08
[848]54 * @version 2.0a
55*/
[890]56class STWriter : public Logger {
[28]57public:
[1353]58 explicit STWriter(const string &format = "SDFITS");
[995]59 virtual ~STWriter();
[28]60
[848]61 /**
62 * Set the format the data should be exported in
63 * @param format an be "SDFITS", "FITS", "MS2" or "ASCII"
64 * @return ststus code from PKSwriter
65 */
66 casa::Int setFormat(const string& format = "SDFITS");
67
68 /**
69 * Write the data to a file (directory)
70 * @param table the Scantable object
71 * @param filename the output file name
72 * @return
73 */
[827]74 casa::Int write(const casa::CountedPtr<Scantable> table,
[848]75 const string& filename);
[28]76
77private:
[827]78 casa::Vector<casa::Float> tsysFromTable(const casa::Table& tab);
79
[822]80 void polConversion( casa::Matrix<casa::Float>& spec,
[827]81 casa::Matrix<casa::uChar>& flag,
[822]82 casa::Vector<casa::Complex>& xpol,
[827]83 const casa::Table& tab);
[1388]84
85 void replacePtTab(const casa::Table& tab, const std::string& fname);
86
[1757]87 casa::String getObsTypes( casa::Int srctype ) ;
88
[988]89 std::string format_;
90 PKSwriter* writer_;
[28]91};
92
[53]93}// namespace
[28]94#endif
Note: See TracBrowser for help on using the repository browser.