Ignore:
Timestamp:
07/29/10 19:13:46 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: Yes

JIRA Issue: No (test merging alma branch)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s):

Description:


Location:
branches/mergetest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/mergetest

  • branches/mergetest/src/STMath.h

    r1689 r1779  
    119119                  const std::string& mode, bool tsys=false );
    120120
     121  // array operation
     122  casa::CountedPtr<Scantable>
     123    arrayOperate( const casa::CountedPtr<Scantable>& in,
     124                  const std::vector<float> val,
     125                  const std::string& mode,
     126                  const std::string& opmode="channel", 
     127                  bool tsys=false );
     128
     129  // channel operation
     130  casa::CountedPtr<Scantable>
     131    arrayOperateChannel( const casa::CountedPtr<Scantable>& in,
     132                         const std::vector<float> val,
     133                         const std::string& mode, bool tsys=false );
     134
     135  // row operation
     136  casa::CountedPtr<Scantable>
     137    arrayOperateRow( const casa::CountedPtr<Scantable>& in,
     138                     const std::vector<float> val,
     139                     const std::string& mode, bool tsys=false );
     140
     141  // 2d array operation
     142  casa::CountedPtr<Scantable>
     143    array2dOperate( const casa::CountedPtr<Scantable>& in,
     144                  const std::vector< std::vector<float> > val,
     145                  const std::string& mode, bool tsys=false );
     146
    121147  casa::CountedPtr<Scantable>
    122148    binaryOperate( const casa::CountedPtr<Scantable>& left,
     
    134160  /**
    135161    * Calibrate total power scans (translated from GBTIDL)
    136     * @param calon uncalibrated Scantable with CAL noise signal
     162    * @param calon uncalibrated Scantable with CAL noise signal 
    137163    * @param caloff uncalibrated Scantable with no CAL signal
    138164    * @param tcal optional scalar Tcal, CAL temperature (K)
    139     * @return casa::CountedPtr<Scantable> which holds a calibrated Scantable
     165    * @return casa::CountedPtr<Scantable> which holds a calibrated Scantable 
    140166    * (spectrum - average of the two CAL on and off spectra;
    141167    * tsys - mean Tsys = <caloff>*Tcal/<calon-caloff> + Tcal/2)
    142     */
     168    */             
    143169  casa::CountedPtr<Scantable> dototalpower( const casa::CountedPtr<Scantable>& calon,
    144170                                            const casa::CountedPtr<Scantable>& caloff,
     
    151177    * @param smoothref optional Boxcar smooth width of the reference scans
    152178    * default: no smoothing (=1)
    153     * @param tsysv optional scalar Tsys value at the zenith, required to
    154     * set tau, as well
     179    * @param tsysv optional scalar Tsys value at the zenith, required to 
     180    * set tau, as well 
    155181    * @param tau optional scalar Tau value
    156182    * @return casa::CountedPtr<Scantable> which holds combined scans
     
    163189                                        casa::Float tau=0.0 );
    164190
    165  /**
     191  /**
    166192    * Calibrate GBT Nod scan pairs (translated from GBTIDL)
    167193    * @param s Scantable which contains Nod scans
     
    170196    * @param tsysv optional scalar Tsys value at the zenith, required to
    171197    * set tau, as well
    172     * @param tau optional scalar Tau value
     198    * @param tau optional scalar Tau value 
    173199    * @param tcal optional scalar Tcal, CAL temperature (K)
    174200    * @return casa::CountedPtr<Scantable> which holds calibrated scans
     
    199225                                    casa::Float tcal=0.0 );
    200226
     227  /**
     228   * Calibrate data with Chopper-Wheel like calibration method
     229   * which adopts position switching by antenna motion,
     230   * wobbler (nutator) switching and On-The-Fly observation.
     231   *
     232   * The method is applicable to APEX, and other telescopes other than GBT.
     233   *
     234   * @param a Scantable which contains ON and OFF scans
     235   * @param a string that indicates calibration mode
     236   * @param a string that indicates antenna name
     237   **/
     238  casa::CountedPtr<Scantable> cwcal( const casa::CountedPtr<Scantable>& s,
     239                                       const casa::String calmode,
     240                                       const casa::String antname );
     241
     242  /**
     243   * Calibrate frequency switched scans with Chopper-Wheel like
     244   * calibration method.
     245   *
     246   * The method is applicable to APEX, and other telescopes other than GBT.
     247   *
     248   * @param a Scantable which contains ON and OFF scans
     249   * @param a string that indicates antenna name
     250   **/
     251  casa::CountedPtr<Scantable> cwcalfs( const casa::CountedPtr<Scantable>& s,
     252                                       const casa::String antname );
     253
     254
     255  /**
     256   * Folding frequency-switch data
     257   * @param sig
     258   * @param ref
     259   * @param choffset
     260   **/
     261  casa::CountedPtr<Scantable> dofold( const casa::CountedPtr<Scantable> &sig,
     262                                      const casa::CountedPtr<Scantable> &ref,
     263                                      casa::Double choffset,
     264                                      casa::Double choffset = 0.0 );
     265
     266  /**
     267   * ALMA calibration
     268   **/
     269  casa::CountedPtr<Scantable> almacal( const casa::CountedPtr<Scantable>& s,
     270                                       const casa::String calmode ) ;
     271  casa::CountedPtr<Scantable> almacalfs( const casa::CountedPtr<Scantable>& s ) ;
    201272
    202273  casa::CountedPtr<Scantable>
     
    206277                               const std::vector<bool>& mask,
    207278                               const std::string& which);
     279
     280  std::vector< int > minMaxChan(const casa::CountedPtr<Scantable>& in,
     281                                const std::vector<bool>& mask,
     282                                const std::string& which);
    208283
    209284  casa::CountedPtr<Scantable> bin( const casa::CountedPtr<Scantable>& in,
     
    266341             double end, const std::string& mode="frequency");
    267342
     343  // test for average spectra with different channel/resolution
     344  casa::CountedPtr<Scantable>
     345    new_average( const std::vector<casa::CountedPtr<Scantable> >& in,
     346                 const bool& compel,
     347                 const std::vector<bool>& mask = std::vector<bool>(),
     348                 const std::string& weight = "NONE",
     349                 const std::string& avmode = "SCAN" )
     350    throw (casa::AipsError) ;
     351
    268352private:
    269353  casa::CountedPtr<Scantable>  applyToPol( const casa::CountedPtr<Scantable>& in,
     
    301385    maskedArray( const casa::Vector<casa::Float>& s,
    302386                 const casa::Vector<casa::uChar>& f );
     387  casa::MaskedArray<casa::Double>
     388    maskedArray( const casa::Vector<casa::Double>& s,
     389                 const casa::Vector<casa::uChar>& f );
    303390  casa::Vector<casa::uChar>
    304391    flagsFromMA(const casa::MaskedArray<casa::Float>& ma);
    305392
     393  vector<float> getSpectrumFromTime( string reftime, casa::CountedPtr<Scantable>& s, string mode = "before" ) ;
     394  vector<float> getTcalFromTime( string reftime, casa::CountedPtr<Scantable>& s, string mode="before" ) ;
     395  vector<float> getTsysFromTime( string reftime, casa::CountedPtr<Scantable>& s, string mode="before" ) ;
     396  vector<int> getRowIdFromTime( string reftime, casa::CountedPtr<Scantable>& s ) ;
     397
     398  // Chopper-Wheel type calibration
     399  vector<float> getCalibratedSpectra( casa::CountedPtr<Scantable>& on,
     400                                      casa::CountedPtr<Scantable>& off,
     401                                      casa::CountedPtr<Scantable>& sky,
     402                                      casa::CountedPtr<Scantable>& hot,
     403                                      casa::CountedPtr<Scantable>& cold,
     404                                      int index,
     405                                      string antname ) ;
     406  // Tsys * (ON-OFF)/OFF
     407  vector<float> getCalibratedSpectra( casa::CountedPtr<Scantable>& on,
     408                                      casa::CountedPtr<Scantable>& off,
     409                                      int index ) ;
     410  vector<float> getFSCalibratedSpectra( casa::CountedPtr<Scantable>& sig,
     411                                        casa::CountedPtr<Scantable>& ref,
     412                                        casa::CountedPtr<Scantable>& sky,
     413                                        casa::CountedPtr<Scantable>& hot,
     414                                        casa::CountedPtr<Scantable>& cold,
     415                                        int index ) ;
     416  vector<float> getFSCalibratedSpectra( casa::CountedPtr<Scantable>& sig,
     417                                        casa::CountedPtr<Scantable>& ref,
     418                                        vector< casa::CountedPtr<Scantable> >& sky,
     419                                        vector< casa::CountedPtr<Scantable> >& hot,
     420                                        vector< casa::CountedPtr<Scantable> >& cold,
     421                                        int index ) ;
     422  double getMJD( string strtime ) ;
     423
    306424  bool insitu_;
    307425};
Note: See TracChangeset for help on using the changeset viewer.