FrequencyAppend.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2007 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/General/Pulsar/FrequencyAppend.h
10 
11 #ifndef _Pulsar_FrequencyAppend_H
12 #define _Pulsar_FrequencyAppend_H
13 
14 #include "Pulsar/Append.h"
15 #include "Pulsar/Config.h"
16 #include "Functor.h"
17 
18 namespace Pulsar {
19 
20  class Integration;
21 
23  class FrequencyAppend : public Append
24  {
25 
26  public:
27 
29  void init (Archive* into);
30 
32  virtual void check (Archive* into, const Archive* from);
33 
34  typedef Functor< void (Integration*) > Weight;
35 
37  static Option< Weight > weight_strategy;
38 
41 
42  protected:
43 
45  virtual bool stop (Archive* into, const Archive* from);
46 
48  virtual void combine (Archive* into, Archive* from);
49 
51  virtual void combine (Integration* into, Integration* from);
52 
53  /* internal */
54  bool check_phase;
55 
57  virtual const Archive::Match* get_mixable_policy (const Archive* into);
58 
59  void generate_new_predictor( Archive* into, Archive* from );
60 
61  };
62 
63 }
64 
65 #endif
66 
void insert(Integration *from)
Inserts Profiles from Integration into this.
Definition: IntegrationExpert.h:69
void set_nchan(unsigned numchan)
Set the number of frequency channels.
Definition: ArchiveExpert.h:52
virtual void set_centre_frequency(double cf)=0
Set the centre frequency of the observation.
virtual const Extension * get_extension(unsigned iextension) const
Return a pointer to the specified extension.
Definition: Archive.C:158
static Configuration::Parameter< Policy > & get_policy()
virtual void check(Archive *into, const Archive *from)
Throw an exception if there is any reason to not call append.
Definition: Append.C:65
virtual void frequency_append(Archive *to, const Archive *from)
Append data along frequency dimension, if applicable.
Definition: ArchiveExtension.h:76
void set_obsnchan(int set_obsnchan)
Set the observed number of channels.
Definition: FITSHdrExtension.C:137
Expert * expert()
Provide access to the expert interface.
Definition: Integration.C:162
void init(Archive *into)
Initialize an archive for appending.
Definition: FrequencyAppend.C:172
const Match * get_mixable() const
Policy determines if data can be combined/integrated.
Definition: Archive_match.C:89
virtual Generator * generator() const=0
virtual void set_bandwidth(double bw)=0
Set the overall bandwidth of the observation.
virtual unsigned get_nsubint() const =0
Get the number of sub-integrations stored in the file.
static Generator * get_default()
The primary interface to pulsar observational data.
Definition: Archive.h:45
static Generator * factory(const Parameters *)
Corrects dispersive delays.
Definition: Dispersion.h:33
bool get_faraday_corrected() const
Data has been corrected for ISM faraday rotation.
Definition: Integration.C:489
const Parameters * get_ephemeris() const
Return a pointer to the current archive ephemeris.
Definition: Archive.C:281
Stores PSRFITS header extensions.
Definition: FITSHdrExtension.h:25
const ExtensionType * get() const
Template method searches for an Extension of the specified type.
static Option< Weight > weight_strategy
The policy used to weight each profile during combine.
Definition: FrequencyAppend.h:42
virtual unsigned get_nchan() const =0
Get the number of frequency channels used.
bool has_model() const
Returns true if the Archive has a model.
Definition: Archive.h:330
virtual double get_centre_frequency() const =0
Get the centre frequency of the observation.
Integration * get_Integration(unsigned subint)
Return pointer to the specified Integration.
Definition: IntegrationManager.C:41
virtual const Archive::Match * get_mixable_policy(const Archive *into)
Return the policy used to verify that data are mixable.
Definition: FrequencyAppend.C:63
Array of Profiles integrated over the same time interval.
Definition: Integration.h:37
double integration_length() const
Returns the total time integrated into all Integrations (in seconds)
Definition: Archive.C:317
virtual long double get_observing_frequency() const=0
Configuration option.
Definition: Config.h:73
bool has_ephemeris() const
Return true if the Archive has an ephemeris.
Definition: Archive.h:321
virtual std::string get_telescope() const =0
Get the name of the telescope used.
Policy used to determine if two archives match.
Definition: ArchiveMatch.h:25
Expert * expert()
Provide access to the expert interface.
Definition: Archive.C:40
MJD end_time() const
Return the MJD at the end of the last sub-integration.
Definition: Archive.C:308
virtual bool get_dedispersed() const =0
Inter-channel dispersion delay has been removed.
virtual void combine(Archive *into, Archive *from)
Add the data in 'from' to 'into'.
Definition: FrequencyAppend.C:96
MJD start_time() const
Return the MJD at the start of the first sub-integration.
Definition: Archive.C:299
virtual double get_bandwidth() const =0
Get the overall bandwidth of the observation.
void set_model(const Predictor *model, bool apply=true)
Install the given predictor and shift profiles to align.
Definition: Archive_set_model.C:14
virtual Match * clone() const
Clone operator.
Definition: ArchiveMatch.C:66
virtual unsigned get_nextension() const
Return the number of extensions available.
Definition: Archive.C:131
virtual void check(Archive *into, const Archive *from)
Throw an exception if there is a reason to not append.
Definition: FrequencyAppend.C:86
void set_obsfreq(double set_obsfreq)
Set the observed frequency.
Definition: FITSHdrExtension.C:117
Interprets configuration strings into a weighting policy.
Definition: WeightInterpreter.h:28
virtual bool stop(Archive *into, const Archive *from)
Return true if there is a benign reason to stop.
Definition: FrequencyAppend.C:73
static unsigned verbose
A verbosity flag that can be set for debugging purposes.
Definition: IntegrationManager.h:38
const Predictor * get_model() const
Return a pointer to the current phase predictor.
Definition: Archive.C:290
static Option< bool > force_new_predictor
Should a new predictor be always generated?
Definition: FrequencyAppend.h:45
void match(const Integration *reference, Integration *to_be_corrected)
Correct the second argument as the first argument was corrected.
Definition: ColdPlasma.h:363
bool get_dedispersed() const
Inter-channel dispersion delay has been removed.
Definition: Integration.C:467
Defines the PSRCHIVE library.
Definition: CalSource.h:17
void generate_new_predictor(Archive *into, Archive *from)
Generate a new predictor spanning the time and frequency range of both into and from.
Definition: FrequencyAppend.C:209
Alternative ways of ordering Integration instances.
Definition: IntegrationOrder.h:29
Corrects Faraday rotation.
Definition: FaradayRotation.h:37
void set_obsbw(double set_obsbw)
Set the observed bandwidth.
Definition: FITSHdrExtension.C:127

Generated using doxygen 1.8.17