Archive Class Referenceabstract

The primary interface to pulsar observational data. More...

#include <Archive.h>

Inheritance diagram for Archive:
Pulsar::IntegrationManager Pulsar::Container Reference::Able Reference::HeapTracked Pulsar::BasicArchive Pulsar::EPNArchive Pulsar::PuMaArchive Pulsar::TimerArchive Pulsar::ASCIIArchive Pulsar::ASPArchive Pulsar::BPPArchive Pulsar::EPOSArchive Pulsar::ExampleArchive Pulsar::FITSArchive Pulsar::PRESTOArchive Pulsar::UVMArchive Pulsar::WAPPArchive Pulsar::pdv_KtZ_Archive Pulsar::BasebandArchive Pulsar::ScintArchive

Classes

class  Expert
 Provides access to private and protected member of Archive. More...
class  Extension
class  Interface
 Provides a text interface to get and set Archive attributes. More...
class  Match
 Policy used to determine if two archives match. More...

Public Member Functions

 Archive ()
 Default constructor.
 Archive (const Archive &archive)
 Copy constructor.
virtual ~Archive ()
 Destructor.
Archiveoperator= (const Archive &a)
 Assignment operator.
template<class T>
const T * get () const
template<class T>
T * get ()
template<class T>
T * getadd ()
Copying and Cloning

The copy methods copy data from other Archive instances; the clone, extract, and total methods return pointers to new copy-constructed instances.

void copy (const Archive &)
 Copy all base class attributes, Extensions, and Integrations.
void copy (const Archive *)
 Copy all base class attributes, Extensions, and Integrations.
virtual Archiveclone () const=0
 Return a new copy constructed instance equal to this.
Archivetotal (bool tscrunch=true) const
 Return pointer to a new fscrunched, tscrunched and pscrunched clone.
Archivetscrunched () const
 Return pointer to a new tscrunched clone.
Archiveextract (std::vector< unsigned > &subints) const
 Return pointer to a new instance with only the specified subints.
Common Attributes

These pure virtual methods provide access to the common attributes stored by all derived classes.

virtual std::string get_telescope () const=0
 Get the name of the telescope used.
virtual void set_telescope (const std::string &code)=0
 Set the name of the telescope used.
virtual Signal::State get_state () const=0
 Get the state of the profile data.
virtual void set_state (Signal::State state)=0
 Set the state of the profile data.
virtual Signal::Scale get_scale () const=0
 Get the scale in which flux density is measured.
virtual void set_scale (Signal::Scale scale)=0
 Set the scale in which flux density is measured.
virtual Signal::Source get_type () const=0
 Get the observation type (psr, cal)
virtual void set_type (Signal::Source type)=0
 Set the observation type (psr, cal)
virtual std::string get_source () const=0
 Get the source name.
virtual void set_source (const std::string &source)=0
 Set the source name.
virtual sky_coord get_coordinates () const=0
 Get the coordinates of the source.
virtual void set_coordinates (const sky_coord &coordinates)=0
 Set the coordinates of the source.
virtual double get_centre_frequency () const=0
 Get the centre frequency of the observation.
virtual void set_centre_frequency (double cf)=0
 Set the centre frequency of the observation.
virtual double get_bandwidth () const=0
 Get the overall bandwidth of the observation.
virtual void set_bandwidth (double bw)=0
 Set the overall bandwidth of the observation.
virtual double get_dispersion_measure () const=0
 Get the dispersion measure (in ${\rm pc\, cm}^{-3}$)
virtual void set_dispersion_measure (double dm)=0
 Set the dispersion measure (in ${\rm pc\, cm}^{-3}$)
virtual bool get_dedispersed () const=0
 Inter-channel dispersion delay has been removed.
virtual void set_dedispersed (bool done=true)=0
 Set the value to be returned by get_dedispersed.
virtual double get_rotation_measure () const=0
 Get the rotation measure (in ${\rm rad\, m}^{-2}$)
virtual void set_rotation_measure (double rm)=0
 Set the rotation measure (in ${\rm rad\, m}^{-2}$)
virtual bool get_faraday_corrected () const=0
 Data has been corrected for ISM faraday rotation.
virtual void set_faraday_corrected (bool done=true)=0
 Set the value to be returned by get_ism_rm_corrected.
virtual bool get_poln_calibrated () const=0
 Data has been calibrated for polarimetric response of instrument.
virtual void set_poln_calibrated (bool done=true)=0
 Set the value to be returned by get_poln_calibrated.
Data Access

These methods provide access to the data contained in the Archive.

Note that get_Integration is implemented by the IntegrationManager base class.

Profileget_Profile (unsigned subint, unsigned pol, unsigned chan)
 Return pointer to the specified profile.
const Profileget_Profile (unsigned subint, unsigned pol, unsigned chan) const
 Return pointer to the specified profile.
TEMPO Interface

These methods provide access to the pulsar ephemeris and predictor as used by TEMPO.

void set_ephemeris (const Parameters *ephemeris, bool update=true)
 Install the given ephemeris and call update_model.
const Parametersget_ephemeris () const
 Return a pointer to the current archive ephemeris.
bool has_ephemeris () const
 Return true if the Archive has an ephemeris.
void set_model (const Predictor *model, bool apply=true)
 Install the given predictor and shift profiles to align.
const Predictorget_model () const
 Return a pointer to the current phase predictor.
bool has_model () const
 Returns true if the Archive has a model.
void update_model ()
 Create a new predictor and align the Integrations to the new model.
void bscrunch (unsigned nscrunch)
 Integrate pulse profiles in phase.
void fold (unsigned nfold)
 Integrate neighbouring sections of the pulse profiles.
void pscrunch ()
 Integrate profiles in polarization.
void fscrunch (unsigned nscrunch=0)
 Integrate profiles in frequency.
void tscrunch (unsigned nscrunch=0)
 Integrate profiles in time.
void rotate (double time)
 Phase rotate each profile by time seconds.
void rotate_phase (double phase)
 Rotate each profile by phase.
void append (const Archive *archive)
 Append the Integrations from the specifed archive.
void remove_chan (unsigned first, unsigned last)
 Delete the specified inclusive channel range from the Archive.
void update_centre_frequency ()
 Update the centre frequency.
void centre (double phase_offset=0.5)
 Phase rotate pulsar Integrations so that pulse phase zero is centred.
void centre_max_bin (double phase_offset=0.5)
 Phase rotate pulsar Integrations so centre the maximum amplitude.
void convert_state (Signal::State state)
 Convert data to the specified state.
Signal::Basis get_basis () const
 Convenience interface to Receiver::get_basis.
void dedisperse ()
 Rotate the Profiles to remove dispersion delays b/w chans.
void defaraday ()
 Correct the Faraday rotation of Q into U.
void transform (const Jones< float > &)
 Perform the transformation on each polarimetric profile.
void transform (const std::vector< Jones< float > > &)
 Perform frequency response on each polarimetric profile.
void transform (const std::vector< std::vector< Jones< float > > > &)
 Perform the time and frequency response on each polarimetric profile.
void invint ()
 Transform Stokes I,Q,U,V into the polarimetric invariant interval.
PhaseWeight * baseline () const
 Return a new PhaseWeight instance with the baseline phase bins masked.
void remove_baseline ()
 Remove the baseline from all profiles.
void uniform_weight (float new_weight=1.0)
 Set the weight of each profile to the given number.
bool standard_match (const Archive *arch, std::string &reason) const
 Test if arch matches (enough for a pulsar - standard match)
bool calibrator_match (const Archive *arch, std::string &reason) const
 Test if arch matches (enough for a pulsar - calibrator match)
bool processing_match (const Archive *arch, std::string &reason) const
 Test if arch matches (enough for a pulsar - pulsar match)
bool mixable (const Archive *arch, std::string &reason) const
 Test if arch is mixable (enough for append)
double weighted_frequency (unsigned ichan, unsigned start, unsigned end) const
 Computes the weighted channel frequency over an Integration interval.
void bscrunch_to_nbin (unsigned new_nbin)
 Call bscrunch with the appropriate value.
void fscrunch_to_nchan (unsigned new_nchan)
 Call fscrunch with the appropriate value.
void tscrunch_to_nsub (unsigned new_nsub)
 Call tscrunch with the appropriate value.
MJD start_time () const
 Return the MJD at the start of the first sub-integration.
MJD end_time () const
 Return the MJD at the end of the last sub-integration.
double integration_length () const
 Returns the total time integrated into all Integrations (in seconds)
bool type_is_cal () const
 Return true if the observation is a calibrator.
void find_transitions (int &hi2lo, int &lo2hi, int &buffer) const
 Find the transitions between high and low states in total intensity.
void find_peak_edges (int &rise, int &fall) const
 Find the bins in which the total intensity exceeds a threshold.
float find_max_phase () const
 Returns the centre phase of the region with maximum total intensity.
float find_min_phase (float dc=0.15) const
 Returns the centre phase of the region with minimum total intensity.
float rms_baseline (float dc=0.4)
 Returns geometric mean of baseline RMS for each Integration.
virtual Interfaceget_interface ()
 Return a text interface that can be used to access this instance.
Public Member Functions inherited from Pulsar::IntegrationManager
 IntegrationManager ()
 null constructor
 IntegrationManager (const IntegrationManager &archive)
 copy constructor
IntegrationManageroperator= (const IntegrationManager &archive)
 operator =
virtual ~IntegrationManager ()
 destructor
Integrationget_Integration (unsigned subint)
 Return pointer to the specified Integration.
Integrationget_last_Integration ()
 Return a pointer to the last Integration.
Integrationget_first_Integration ()
 Return a pointer to the first Integration.
const Integrationget_Integration (unsigned subint) const
 Return const pointer to the specified Integration.
const Integrationget_last_Integration () const
 Return a const pointer to the last Integration.
const Integrationget_first_Integration () const
 Return a const pointer to the first Integration.
virtual Integrationnew_Integration (const Integration *copy=0)=0
 Construct new Integration instance.
virtual Integrationuse_Integration (Integration *use)=0
 Use the given Integration instance.
virtual unsigned get_nsubint () const =0
 Get the number of sub-integrations stored in the file.
template<class StrictWeakOrdering>
void sort (StrictWeakOrdering comp=temporal_order)
 Sort the Integrations according to the specified order.
void shuffle ()
 Randomly rearrange the sub-integrations.
Expertexpert ()
 Provide access to the expert interface.
Public Member Functions inherited from Reference::Able
 Able (const Able &)
Ableoperator= (const Able &)
unsigned get_reference_count () const
Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
HeapTrackedoperator= (const HeapTracked &)
bool __is_on_heap () const

Static Public Member Functions

Factories

These factories return pointers to new instances of derived classes.

static Archivenew_Archive (const std::string &class_name)
 Factory returns a null-constructed instance of the named class.
static Archiveload (const std::string &name)
 Factory returns a new instance loaded from filename.
static unsigned get_instance_count ()
 Returns the number of Archive instances currently in existence.
Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
static void operator delete (void *location, void *ptr)
static void operator delete (void *location)
static size_t get_heap_queue_size ()

Extension Interface

Derived classes can provide access to the additional information available in their associated file format through use of Extension classes.

static Functor< void(Archive *) > remove_baseline_strategy
 The default baseline removal strategy.
class Expert
 The default baseline removal strategy.
virtual unsigned get_nextension () const
 Return the number of extensions available.
virtual const Extensionget_extension (unsigned iextension) const
 Return a pointer to the specified extension.
virtual Extensionget_extension (unsigned iextension)
 Return a pointer to the specified extension.
template<class ExtensionType>
bool has () const
 Template method searches for an Extension of the specified type.
template<class ExtensionType>
const ExtensionType * get () const
 Template method searches for an Extension of the specified type.
template<class ExtensionType>
ExtensionType * get ()
 Template method searches for an Extension of the specified type.
template<class ExtensionType>
ExtensionType * getadd ()
 Template method returns an Extension of the specified type.
virtual void add_extension (Extension *extension)
 Add an Extension to the Archive instance.
Expertexpert ()
 Provide access to the expert interface.
const Expertexpert () const
 Provide access to the expert interface.
const Matchget_standard_match () const
 Policy determines if a standard/template matches an observation.
void set_standard_match (Match *)
 The default baseline removal strategy.
const Matchget_calibrator_match () const
 Policy determines if a calibrator matches an observation.
void set_calibrator_match (Match *)
 The default baseline removal strategy.
const Matchget_processing_match () const
 Policy determines if data were processed identically.
void set_processing_match (Match *)
 The default baseline removal strategy.
const Matchget_mixable () const
 Policy determines if data can be combined/integrated.
void set_mixable (Match *)
 The default baseline removal strategy.
StrategySet * get_strategy () const
 Returns the strategy manager.
static void agent_report ()
 Report on the status of the plugins.
static void agent_list ()
 List the successfully loaded plugins.
static void set_verbosity (unsigned level)
 Set the verbosity level (0 to 3)
static std::string get_revision (const char *revision)
 Parses the revision number out of the CVS Revision string.

File I/O

These pure virtual methods must be defined by derived classes in order to handle loading and unloading data to and from specific file formats.

static Option< std::string > unload_class
 Name of class to which data are converted if unload_file unimplemented.
static Option< bool > unload_cull_predictor
 Default policy for culling predictor coefficients when unloading.
static Option< bool > no_clobber
 Default policy for overwriting archive files.
std::string unload_filename
 Name of file to which the archive will be written on call to unload()
virtual bool can_unload () const=0
 Return true if the unload method is implemented.
void unload (const char *filename=0) const
 Write the archive to filename.
void unload (const std::string &filename) const
 Convenience interface to Archive::unload (const char*)
std::string get_filename () const
 Get the name of the file to which the archive will be unloaded.
void set_filename (const std::string &filename)
 Set the filename of the Archive.
void update ()
 Update the current archive, saving current Integration data.
void refresh ()
 Completely reload the archive, deleting all data.
virtual void load_header (const char *filename)=0
 Load the header information from filename.
virtual Integrationload_Integration (const char *filename, unsigned subint)=0
 Load the specified Integration from filename, returning new instance.
virtual void unload_file (const char *filename) const=0
 Unload the Archive (header and Integration data) to filename.

Dimension Attributes

These pure virtual methods are used by the Archive class to set the dimension attributes stored by the derived classes.

Reference::To< Parameters > ephemeris
 The pulsar ephemeris, as used by TEMPO.
Reference::To< Expertexpert_interface
 Expert interface.
Reference::To< Interfacetext_interface
 Text interface.
Reference::To< Matchstandard_match_policy
 The pulsar ephemeris, as used by TEMPO.
Reference::To< Matchcalibrator_match_policy
 The pulsar ephemeris, as used by TEMPO.
Reference::To< Matchprocessing_match_policy
 The pulsar ephemeris, as used by TEMPO.
Reference::To< Matchmixable_policy
 The pulsar ephemeris, as used by TEMPO.
virtual unsigned get_nbin () const=0
 Get the number of pulsar phase bins used.
virtual unsigned get_nchan () const=0
 Get the number of frequency channels used.
virtual unsigned get_npol () const=0
 Get the number of polarizations.
virtual void resize (unsigned nsubint, unsigned npol=0, unsigned nchan=0, unsigned nbin=0)
 Resize the Integration vector with new_Integration instances.
virtual void erase (unsigned isubint)
 Remove the specified sub-integration.
void reverse_chan ()
 Reverse the order of frequency channels.
void update_model (unsigned old_nsubint, bool clear_model=false)
 Update the predictor model and correct the Integration set.
void update_model (const MJD &time, bool clear_model=false)
 Update the predictor to include the specifed MJD.
virtual void set_nbin (unsigned numbins)=0
 Set the number of pulsar phase bins.
virtual void set_nchan (unsigned numchan)=0
 Set the number of frequency channels.
virtual void set_npol (unsigned numpol)=0
 Set the number of polarization measurements.
void set_predictor (Predictor *model)
 Set the phase predictor attribute without any computation.
Integrationuse_Integration (Integration *)
 Return the given Integration ready for use.
void init_Integration (Integration *subint, bool check_phase=false)
 Initialize an Integration to reflect Archive attributes.
void resize_Integration (Integration *integration)
 Provide Integration::resize access to Archive-derived classes.
void apply_model (Integration *subint, const Predictor *old=0)
 Apply the current model to the Integration.
void create_updated_model (bool clear_model)
 Creates polynomials to span the Integration set.
bool good_model (const Predictor *test_model) const
 Returns true if the given model spans the Integration set.
bool zero_phase_aligned () const
 Return true if all Integration::zero_phase_aligned flags are set.

Additional Inherited Members

Static Public Attributes inherited from Pulsar::IntegrationManager
static unsigned verbose = 0
 A verbosity flag that can be set for debugging purposes.
Protected Member Functions inherited from Pulsar::IntegrationManager
virtual void set_nsubint (unsigned num_sub)=0
 Set the number of sub-integrations.
virtual void _resize (unsigned nsubint, bool instances=true)
 Resize the Integration vector.
void append (const IntegrationManager *more_subints)
 Append new_Integration copies of Integration objects to self.
void manage (IntegrationManager *more_subints)
 Append use_Integration modifications of Integration objects to self.
void manage (Integration *integration)
 Directly append the Integration instance (no copy)
void insert (unsigned isubint, Integration *integration)
 Insert the Integration instance into the specified location.
void unmanage (const Integration *)
 Remove the Integration instance.
void unmanage (unsigned isubint)
 Remove the Integration at the specified index.
void load_all ()
 Load all sub-integrations.
Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
void __dereference (bool auto_delete=true) const

Detailed Description

The primary interface to pulsar observational data.

This virtual base class implements the primary interface to pulsar observational data, including the pulse profiles, integrations, and all auxilliary data. All file I/O and various data reduction algorithms are accessed via this class.

Constructor & Destructor Documentation

◆ Archive()

Pulsar::Archive::Archive ( const Archive & archive)

Copy constructor.

The Archive copy constructor must never be called, call Archive::copy.

Member Function Documentation

◆ add_extension()

void Pulsar::Archive::add_extension ( Extension * ext)
virtual

Add an Extension to the Archive instance.

This method ensures that only one instance of the Extension type is stored in the Archive.

Derived classes need only define this method, as the non-const version implemented by the Archive base class simply calls this method.

◆ append()

void Pulsar::Archive::append ( const Archive * arch)

Append the Integrations from the specifed archive.

Add clones of the Integrations in arch to this.

◆ apply_model()

void Pulsar::Archive::apply_model ( Integration * subint,
const Predictor * old = 0 )
protected

Apply the current model to the Integration.

This method aligns the Integration to the current polyco, as stored in the model attribute. The Integration is rotated by the difference between the phase predicted by the current model and that predicted by the old model.

Parameters
oldthe old polyco used to describe subint
subintpointer to the Integration to be aligned to the current model

◆ bscrunch()

void Pulsar::Archive::bscrunch ( unsigned nscrunch)

Integrate pulse profiles in phase.

Simply calls Integration::bscrunch for each Integration

Parameters
nscrunchthe number of phase bins to add together

◆ bscrunch_to_nbin()

void Pulsar::Archive::bscrunch_to_nbin ( unsigned new_nbin)

Call bscrunch with the appropriate value.

Useful wrapper for Archive::bscrunch

◆ centre()

void Pulsar::Archive::centre ( double phase_offset = 0.5)

Phase rotate pulsar Integrations so that pulse phase zero is centred.

Uses the polyco model, as well as the centre frequency and mid-time of each Integration to determine the predicted pulse phase.

◆ centre_max_bin()

void Pulsar::Archive::centre_max_bin ( double phase_offset = 0.5)

Phase rotate pulsar Integrations so centre the maximum amplitude.

Rotate pulsar Integrations so that the bin of largest amplitude is centred

◆ clone()

virtual Archive * Pulsar::Archive::clone ( ) const
pure virtual

Return a new copy constructed instance equal to this.

This pure virtual method must be implemented by derived classes

◆ convert_state()

void Pulsar::Archive::convert_state ( Signal::State state)

Convert data to the specified state.

Simply calls Integration::convert_state for each Integration

◆ create_updated_model()

void Pulsar::Archive::create_updated_model ( bool clear_model)
protected

Creates polynomials to span the Integration set.

The polyco need only describe the phase and period of every Integration. When the Integrations are separated by a large amount of time, the creation of a new polyco to completely span this time results in a huge polyco.dat and a huge waste of time.

Therefore, this method attempts to create the minimum set of polyco polynomials required to describe the data. If a match is not found in the current model, a single polynomial is created and appended to the current model.

Parameters
clear_modeldelete the current model after copying its attributes

◆ dedisperse()

void Pulsar::Archive::dedisperse ( )

Rotate the Profiles to remove dispersion delays b/w chans.

The dedisperse method removes the dispersive delay between each frequency channel and that of the reference frequency defined by get_centre_frequency.

◆ defaraday()

void Pulsar::Archive::defaraday ( )

Correct the Faraday rotation of Q into U.

The defaraday method corrects the Faraday rotation between each frequency channel and that of the reference frequency defined by get_centre_frequency.

Precondition
The Archive must contain full polarimetric data
The noise contribution to Stokes Q and U should have been removed.

◆ find_max_phase()

float Pulsar::Archive::find_max_phase ( ) const

Returns the centre phase of the region with maximum total intensity.

◆ find_min_phase()

float Pulsar::Archive::find_min_phase ( float dc = 0.15) const

Returns the centre phase of the region with minimum total intensity.

◆ find_peak_edges()

void Pulsar::Archive::find_peak_edges ( int & rise,
int & fall ) const

Find the bins in which the total intensity exceeds a threshold.

◆ find_transitions()

void Pulsar::Archive::find_transitions ( int & hi2lo,
int & lo2hi,
int & buf ) const

Find the transitions between high and low states in total intensity.

◆ fold()

void Pulsar::Archive::fold ( unsigned nfold)

Integrate neighbouring sections of the pulse profiles.

Parameters
nfoldthe number of sections to integrate

◆ fscrunch()

void Pulsar::Archive::fscrunch ( unsigned nscrunch = 0)

Integrate profiles in frequency.

Simply calls Integration::fscrunch for each Integration

Parameters
nscrunchthe number of frequency channels to add together

◆ fscrunch_to_nchan()

void Pulsar::Archive::fscrunch_to_nchan ( unsigned new_chan)

Call fscrunch with the appropriate value.

Useful wrapper for Archive::fscrunch

◆ get() [1/2]

template<class T>
T * Pulsar::Archive::get ( )

e.g. Archive* archive; MyExtension* ext = archive->get<MyExtension>();

◆ get() [2/2]

template<class T>
const T * Pulsar::Archive::get ( ) const

e.g. const Archive* archive; const MyExtension* ext = archive->get<MyExtension>();

◆ get_extension() [1/2]

Pulsar::Archive::Extension * Pulsar::Archive::get_extension ( unsigned iext)
virtual

Return a pointer to the specified extension.

Simply calls get_extension const

◆ get_extension() [2/2]

const Pulsar::Archive::Extension * Pulsar::Archive::get_extension ( unsigned iext) const
virtual

Return a pointer to the specified extension.

Derived classes need only define this method, as the non-const version implemented by the Archive base class simply calls this method.

◆ get_Profile()

Pulsar::Profile * Pulsar::Archive::get_Profile ( unsigned sub,
unsigned pol,
unsigned chan )

Return pointer to the specified profile.

Return a pointer to the Profile.

Parameters
subthe index of the requested Integration
polthe index of the requested polarization
chanthe index of the requested frequency channel
Returns
pointer to Profile instance

◆ getadd()

template<class T>
T * Pulsar::Archive::getadd ( )

If the specified extension type T does not exist, an atempt is made to add it using add_extension. If this fails, NULL is returned.

◆ good_model()

bool Pulsar::Archive::good_model ( const Predictor * test_model) const
protected

Returns true if the given model spans the Integration set.

This method tests if the given phase predictor applies to each Integration, returning false if an exception is thrown.

Parameters
test_modelthe Predictor to be tested

◆ has()

template<class T>
bool Pulsar::Archive::has ( ) const

Template method searches for an Extension of the specified type.

e.g. const Archive* archive; const MyExtension* ext = archive->get<MyExtension>();

◆ init_Integration()

void Pulsar::Archive::init_Integration ( Integration * subint,
bool check_phase = false )
protected

Initialize an Integration to reflect Archive attributes.

This should be performed after the integration is considered complete.

After an Integration has been loaded from disk, this method ensures that various internal book-keeping attributes are initialized.

◆ new_Archive()

Pulsar::Archive * Pulsar::Archive::new_Archive ( const std::string & class_name)
static

Factory returns a null-constructed instance of the named class.

Return a null-constructed instance of the derived class.

◆ operator=()

Pulsar::Archive & Pulsar::Archive::operator= ( const Archive & a)

Assignment operator.

operator =

◆ pscrunch()

void Pulsar::Archive::pscrunch ( )

Integrate profiles in polarization.

Simply calls Integration::pscrunch for each Integration

◆ resize()

void Pulsar::Archive::resize ( unsigned nsubint,
unsigned npol = 0,
unsigned nchan = 0,
unsigned nbin = 0 )
virtual

Resize the Integration vector with new_Integration instances.

If any current dimension is greater than that requested, the extra Profiles will be deleted and the dimension resized. If any current dimension is smaller than that requested, the dimension will be resized and new Profiles will be constructed. If one or more of the npol, nchan, or nbin arguments is set to zero, the dimension is left unchanged.

◆ rms_baseline()

float Pulsar::Archive::rms_baseline ( float baseline_width = 0.4)

Returns geometric mean of baseline RMS for each Integration.

Returns the geometric mean of the rms of the baseline for the 0,0th profile in each Integration. MB Feb 2004.

◆ set_ephemeris()

void Pulsar::Archive::set_ephemeris ( const Parameters * new_ephemeris,
bool update = true )

Install the given ephemeris and call update_model.

Parameters
new_ephemeristhe ephemeris to be installed
updatecreate a new polyco for the new ephemeris

◆ set_filename()

void Pulsar::Archive::set_filename ( const std::string & filename)
inline

Set the filename of the Archive.

The filename is the name of the file to which the archive will be written on the next call to Archive::unload, if no arguments are given to the Archive::unload method.

◆ set_predictor()

void Pulsar::Archive::set_predictor ( Pulsar::Predictor * _model)
protected

Set the phase predictor attribute without any computation.

In Base/ it is not possible to call set_model(apply=false) because Archive::set_model is defined in More/

◆ set_verbosity()

void Pulsar::Archive::set_verbosity ( unsigned level)
static

Set the verbosity level (0 to 3)

note that Archive::verbose is IntegrationManager::verbose

◆ total()

Pulsar::Archive * Pulsar::Archive::total ( bool tscrunch = true) const

Return pointer to a new fscrunched, tscrunched and pscrunched clone.

This method is primarily designed for use by the Archive::find_* methods.

◆ tscrunch()

void Pulsar::Archive::tscrunch ( unsigned nscrunch = 0)

Integrate profiles in time.

Parameters
nscrunchnumber of neighbouring Integrations to add. If nscrunch == 0, then add all Integrations together

◆ tscrunch_to_nsub()

void Pulsar::Archive::tscrunch_to_nsub ( unsigned new_nsub)

Call tscrunch with the appropriate value.

Useful wrapper for Archive::tscrunch

◆ tscrunched()

Pulsar::Archive * Pulsar::Archive::tscrunched ( ) const

Return pointer to a new tscrunched clone.

This is more efficient than clone followed by tscrunch

◆ unload()

void Pulsar::Archive::unload ( const char * filename = 0) const

Write the archive to filename.

To protect data, especially when writing the output archive to a file of the same name as the input archive, this method unloads data to a temporary file before renaming the archive to the requested output file name. The temporary file will be written using a unique filename in the same path as the requested output file.

◆ update_model() [1/2]

void Pulsar::Archive::update_model ( )

Create a new predictor and align the Integrations to the new model.

This method should be called when the ephemeris attribute is modified. It may also be called when the tempo support files (e.g. leap.sec, ut1.dat) change.

◆ update_model() [2/2]

void Pulsar::Archive::update_model ( unsigned nsubint,
bool clear = false )
protected

Update the predictor model and correct the Integration set.

This method economizes on the number of times that the polyco is re-created and the Integrations are re-aligned to the model.

By setting the Integration::zero_phase_aligned attribute, each sub-integration is flagged as no longer in need of alignment.

If Integration::zero_phase_aligned is false, then the Integration is re-aligned to the new model (see Archive::apply_model).

Parameters
nsubintthe number of Integrations to correct
clearif true, clear the current model

◆ weighted_frequency()

double Pulsar::Archive::weighted_frequency ( unsigned ichan,
unsigned start,
unsigned end ) const

Computes the weighted channel frequency over an Integration interval.

Returns
the new weighted centre frequency (in MHz, rounded to nearest kHz)
Parameters
ichanthe index of the requested frequency channel
startthe index of the first Integration to include in the mean
endone more than the index of the last Integration

The documentation for this class was generated from the following files:
  • Archive.h
  • Archive.C
  • Archive_copy.C
  • Archive_correct.C
  • Archive_extract.C
  • Archive_init_Integration.C
  • Archive_load.C
  • Archive_load_Integration.C
  • Archive_match.C
  • Archive_remove_chan.C
  • Archive_resize.C
  • Archive_unload.C
  • Archive_update_centre_frequency.C
  • Archive_verbose.C
  • Archive_verify.C
  • ArchiveExtension.h
  • Agent_static.C
  • Archive_append.C
  • Archive_apply_model.C
  • Archive_baseline.C
  • Archive_bscrunch.C
  • Archive_centre.C
  • Archive_centre_max_bin.C
  • Archive_convert_state.C
  • Archive_dedisperse.C
  • Archive_defaraday.C
  • Archive_find.C
  • Archive_fold.C
  • Archive_fscrunch.C
  • Archive_good_model.C
  • Archive_invint.C
  • Archive_pscrunch.C
  • Archive_remove_baseline.C
  • Archive_rms_baseline.C
  • Archive_rotate.C
  • Archive_set_ephemeris.C
  • Archive_set_model.C
  • Archive_total.C
  • Archive_transform.C
  • Archive_tscrunch.C
  • Archive_tscrunched.C
  • Archive_update_history.C
  • Archive_update_model.C
  • Archive_weighted_frequency.C
  • StrategySet.C

Generated using doxygen 1.14.0