source: trunk/src/STWriter.h @ 3106

Last change on this file since 3106 was 3106, checked in by Takeshi Nakazato, 8 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes/No?

Interface Changes: Yes/No?

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...


Check-in asap modifications from Jim regarding casacore namespace conversion.

  • 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 3106 2016-10-04 07:20:50Z TakeshiNakazato $
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>
[1819]38#include <casa/BasicSL/String.h>
[28]39
[827]40#include "Scantable.h"
[28]41
42class PKSwriter;
43
[83]44namespace asap {
[848]45/**
46  * This exports the ASAP internal data format to othe formats,
47  * such as "SDFITS", "FITS", "MS2" or "ASCII"
48  *
[894]49  * @brief Export of ASAP data container into foreign formats
[848]50  * @author Malte Marquarding
[988]51  * @date 2006-03-08
[848]52  * @version 2.0a
53*/
[2658]54class STWriter {
[28]55public:
[1353]56  explicit STWriter(const string &format = "SDFITS");
[995]57  virtual ~STWriter();
[28]58
[848]59  /**
60   * Set the format the data should be exported in
61   * @param format an be "SDFITS", "FITS", "MS2" or "ASCII"
62   * @return ststus code from PKSwriter
63   */
[3106]64  casacore::Int setFormat(const string& format = "SDFITS");
[848]65
66  /**
67   * Write the data to a file (directory)
68   * @param table the Scantable object
69   * @param filename the output file name
70   * @return
71   */
[3106]72  casacore::Int write(const casacore::CountedPtr<Scantable> table,
[848]73            const string& filename);
[28]74
75private:
[3106]76  casacore::Vector<casacore::Float> tsysFromTable(const casacore::Table& tab);
[827]77
[3106]78  void polConversion( casacore::Matrix<casacore::Float>& spec,
79                      casacore::Matrix<casacore::uChar>& flag,
80                      casacore::Vector<casacore::Complex>& xpol,
81                      const casacore::Table& tab);
[1391]82
[3106]83  casacore::String getObsTypes( casacore::Int srctype ) ;
[1819]84
[988]85  std::string     format_;
86  PKSwriter* writer_;
[28]87};
88
[53]89}// namespace
[28]90#endif
Note: See TracBrowser for help on using the repository browser.