Archive.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2002 - 2022 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/Base/Classes/Pulsar/Archive.h
10
11#ifndef __Pulsar_Archive_h
12#define __Pulsar_Archive_h
13
14#include "Pulsar/IntegrationManager.h"
15#include "Pulsar/Config.h"
16
17#include "sky_coord.h"
18#include "MJD.h"
19
20#include "Functor.h"
21#include "Estimate.h"
22#include "Types.h"
23
24#include <iostream>
25
26template<typename T> class Jones;
27
28namespace Pulsar
29{
30 class Receiver;
31 class Integration;
32 class Profile;
33 class PhaseWeight;
34
35 class Predictor;
36 class Parameters;
37
38 class StrategySet;
39
41
46 {
47
48 public:
49
50 // //////////////////////////////////////////////////////////////////
51 //
52 //
53 // //////////////////////////////////////////////////////////////////
54
56 Archive ();
57
59 Archive (const Archive& archive);
60
62 virtual ~Archive ();
63
65 Archive& operator = (const Archive& a);
66
67
68 // //////////////////////////////////////////////////////////////////
69 //
70 // Factories, loading, unloading, and refreshing
71 //
72 // //////////////////////////////////////////////////////////////////
73
79
81 static Archive* new_Archive (const std::string& class_name);
82
84 static Archive* load (const std::string& name);
85
87 static unsigned get_instance_count ();
88
90
96
98 virtual bool can_unload () const = 0;
99
101 void unload (const char* filename = 0) const;
102
104 void unload (const std::string& filename) const
105 { unload (filename.c_str()); }
106
108 std::string get_filename () const { return unload_filename; }
109
111
114 void set_filename (const std::string& filename)
115 { unload_filename = filename; }
116
118 void update ();
119
121 void refresh ();
122
124
125 // //////////////////////////////////////////////////////////////////
126 //
127 // Copying and cloning
128 //
129 // //////////////////////////////////////////////////////////////////
130
138
140 void copy (const Archive&);
141 void copy (const Archive*);
142
144
145 virtual Archive* clone () const = 0;
146
148 Archive* total (bool tscrunch = true) const;
149
151
152 Archive* tscrunched () const;
153
155 Archive* extract (std::vector<unsigned>& subints) const;
156
158
159 // //////////////////////////////////////////////////////////////////
160 //
161 // Dimension Attributes
162 //
163 // //////////////////////////////////////////////////////////////////
164
172
174 virtual unsigned get_nbin () const = 0;
175
177 virtual unsigned get_nchan () const = 0;
178
180 virtual unsigned get_npol () const = 0;
181
183 virtual void resize (unsigned nsubint,
184 unsigned npol = 0,
185 unsigned nchan = 0,
186 unsigned nbin = 0);
187
189 virtual void erase (unsigned isubint);
190
192 void reverse_chan ();
193
195
196 // //////////////////////////////////////////////////////////////////
197 //
198 // Common Attributes
199 //
200 // //////////////////////////////////////////////////////////////////
201
208
210 virtual std::string get_telescope () const = 0;
212 virtual void set_telescope (const std::string& code) = 0;
213
215 virtual Signal::State get_state () const = 0;
217 virtual void set_state (Signal::State state) = 0;
218
220 virtual Signal::Scale get_scale () const = 0;
222 virtual void set_scale (Signal::Scale scale) = 0;
223
225 virtual Signal::Source get_type () const = 0;
227 virtual void set_type (Signal::Source type) = 0;
228
230 virtual std::string get_source () const = 0;
232 virtual void set_source (const std::string& source) = 0;
233
235 virtual sky_coord get_coordinates () const = 0;
237 virtual void set_coordinates (const sky_coord& coordinates) = 0;
238
240 virtual double get_centre_frequency () const = 0;
242 virtual void set_centre_frequency (double cf) = 0;
243
245 virtual double get_bandwidth () const = 0;
247 virtual void set_bandwidth (double bw) = 0;
248
250 virtual double get_dispersion_measure () const = 0;
252 virtual void set_dispersion_measure (double dm) = 0;
253
255 virtual bool get_dedispersed () const = 0;
257 virtual void set_dedispersed (bool done = true) = 0;
258
260 virtual double get_rotation_measure () const = 0;
262 virtual void set_rotation_measure (double rm) = 0;
263
265 virtual bool get_faraday_corrected () const = 0;
267 virtual void set_faraday_corrected (bool done = true) = 0;
268
270 virtual bool get_poln_calibrated () const = 0;
272 virtual void set_poln_calibrated (bool done = true) = 0;
273
275
276
277 // //////////////////////////////////////////////////////////////////
278 //
279 // Access to data
280 //
281 // //////////////////////////////////////////////////////////////////
282
290
292 Profile* get_Profile (unsigned subint, unsigned pol, unsigned chan);
293
295 const Profile*
296 get_Profile (unsigned subint, unsigned pol, unsigned chan) const;
297
299
300
301 // //////////////////////////////////////////////////////////////////
302 //
303 // Pulsar Ephemeris and Predictor
304 //
305 // //////////////////////////////////////////////////////////////////
306
313
315 void set_ephemeris (const Parameters* ephemeris, bool update = true);
316
318 const Parameters* get_ephemeris() const;
319
321 bool has_ephemeris () const { return ephemeris; }
322
324 void set_model (const Predictor* model, bool apply = true);
325
327 const Predictor* get_model() const;
328
330 bool has_model() const { return model; }
331
333 void update_model ();
334
336
337 // //////////////////////////////////////////////////////////////////
338 //
339 // Basic algorithms
340 //
341 // //////////////////////////////////////////////////////////////////
342
344 void bscrunch (unsigned nscrunch);
345
347 void fold (unsigned nfold);
348
350 void pscrunch();
351
353 void fscrunch (unsigned nscrunch=0);
354
356 void tscrunch (unsigned nscrunch=0);
357
359 void rotate (double time);
360
362 void rotate_phase (double phase);
363
365 void append (const Archive* archive);
366
368 void remove_chan(unsigned first, unsigned last);
369
372
374 void centre (double phase_offset = 0.5);
375
377 void centre_max_bin (double phase_offset = 0.5);
378
380 void convert_state (Signal::State state);
381
383 Signal::Basis get_basis () const;
384
386 void dedisperse ();
387
389 void defaraday ();
390
392 void transform (const Jones<float>&);
393
395 void transform (const std::vector< Jones<float> >&);
396
398 void transform (const std::vector< std::vector< Jones<float> > >&);
399
401 void invint ();
402
404 PhaseWeight* baseline () const;
405
407 void remove_baseline ();
408
410 void uniform_weight (float new_weight = 1.0);
411
413 bool standard_match (const Archive* arch, std::string& reason) const;
414
416 bool calibrator_match (const Archive* arch, std::string& reason) const;
417
419 bool processing_match (const Archive* arch, std::string& reason) const;
420
422 bool mixable (const Archive* arch, std::string& reason) const;
423
425 double weighted_frequency (unsigned ichan,
426 unsigned start, unsigned end) const;
427
429 void bscrunch_to_nbin (unsigned new_nbin);
430
432 void fscrunch_to_nchan (unsigned new_nchan);
433
435 void tscrunch_to_nsub (unsigned new_nsub);
436
438 MJD start_time () const;
439
441 MJD end_time () const;
442
444 double integration_length() const;
445
447 bool type_is_cal () const;
448
450 void find_transitions (int& hi2lo, int& lo2hi, int& buffer) const;
451
453 void find_peak_edges (int& rise, int& fall) const;
454
456 float find_max_phase () const;
457
459 float find_min_phase (float dc = 0.15) const;
460
462 float rms_baseline (float dc = 0.4);
463
465 class Interface;
466
468 virtual Interface* get_interface ();
469
470 // //////////////////////////////////////////////////////////////////
471 //
472 // Archive Extension interface
473 //
474 // //////////////////////////////////////////////////////////////////
475
483
485 class Extension;
486
488 virtual unsigned get_nextension () const;
489
491 virtual const Extension* get_extension (unsigned iextension) const;
492
494 virtual Extension* get_extension (unsigned iextension);
495
497 template<class ExtensionType>
498 bool has () const;
499
501 template<class ExtensionType>
502 const ExtensionType* get () const;
503
505 template<class ExtensionType>
506 ExtensionType* get ();
507
509 template<class ExtensionType>
510 ExtensionType* getadd ();
511
513
515 virtual void add_extension (Extension* extension);
516
518
519 // //////////////////////////////////////////////////////////////////
520 //
521 // Class members
522 //
523 // //////////////////////////////////////////////////////////////////
524
526 static void agent_report ();
527
529 static void agent_list ();
530
532
533 static void set_verbosity (unsigned level);
534
536 class Check;
537
538 // //////////////////////////////////////////////////////////////////
539 //
540 // Expert interface
541 //
542 // //////////////////////////////////////////////////////////////////
543
545 class Expert;
546
548 Expert* expert ();
549 const Expert* expert () const;
550
551 // //////////////////////////////////////////////////////////////////
552 //
553 // Matching policies
554 //
555 // //////////////////////////////////////////////////////////////////
556
558 class Match;
559
561 const Match* get_standard_match () const;
563
565 const Match* get_calibrator_match () const;
567
569 const Match* get_processing_match () const;
571
573 const Match* get_mixable () const;
574 void set_mixable (Match*);
575
578
580 StrategySet* get_strategy() const;
581
582 protected:
583
584 friend class Expert;
585
587 static std::string get_revision (const char* revision);
588
589 // //////////////////////////////////////////////////////////////////
590 //
591 // File I/O
592 //
593 // //////////////////////////////////////////////////////////////////
594
602
605
608
611
613 virtual void load_header (const char* filename) = 0;
614
616 virtual Integration*
617 load_Integration (const char* filename, unsigned subint) = 0;
618
620 virtual void unload_file (const char* filename) const = 0;
621
623
625 std::string unload_filename;
626
627 // //////////////////////////////////////////////////////////////////
628 //
629 // Dimension Attributes
630 //
631 // //////////////////////////////////////////////////////////////////
632
639
641 virtual void set_nbin (unsigned numbins) = 0;
642
644 virtual void set_nchan (unsigned numchan) = 0;
645
647 virtual void set_npol (unsigned numpol) = 0;
648
650
652
654 void set_predictor (Predictor* model);
655
658
661
663
664 void init_Integration (Integration* subint, bool check_phase = false);
665
667 void resize_Integration (Integration* integration);
668
670 void apply_model (Integration* subint, const Predictor* old = 0);
671
673 void update_model (unsigned old_nsubint, bool clear_model = false);
674
676 void update_model (const MJD& time, bool clear_model = false);
677
679 void create_updated_model (bool clear_model);
680
682 bool good_model (const Predictor* test_model) const;
683
685 bool zero_phase_aligned () const;
686
689
692
697
698 private:
699
701 mutable std::vector< Reference::To<Extension> > extension;
702
704 mutable Reference::To<StrategySet> strategy;
705
708
710 mutable Reference::To<Predictor> unload_model;
711
713 void create_unload_model() const;
714
716
720 std::string __load_filename;
721
723 mutable std::vector<unsigned>* copy_subints;
724 unsigned copy_nsubint () const;
725 unsigned copy_isubint (unsigned) const;
726
728 Integration* load_Integration (unsigned isubint);
729
731
732 void update_absolute_dispersion();
733
735
736 void update_absolute_rotation();
737
739 void init ();
740
742 void correct ();
743
745 void verify () const;
746
747 // Advocates the use of an Archive derived class
748 class Agent;
749
750 protected:
751
752 // Advocates the use of Plugin
753 template<class Plugin> class Advocate;
754
755 };
756
758 bool in_frequency_order (const Archive* A, const Archive* B);
759
760}
761
762#endif
763
Archive()
Default constructor.
Definition Archive.C:67
Provides access to private and protected member of Archive.
Definition ArchiveExpert.h:30
Definition ArchiveExtension.h:24
Policy used to determine if two archives match.
Definition ArchiveMatch.h:21
The primary interface to pulsar observational data.
Definition Archive.h:46
virtual ~Archive()
Destructor.
Definition Archive.C:86
virtual void set_coordinates(const sky_coord &coordinates)=0
Set the coordinates of the source.
static std::string get_revision(const char *revision)
Parses the revision number out of the CVS Revision string.
virtual bool get_dedispersed() const =0
Inter-channel dispersion delay has been removed.
void tscrunch_to_nsub(unsigned new_nsub)
Call tscrunch with the appropriate value.
Definition Archive_tscrunch.C:32
Signal::Basis get_basis() const
Convenience interface to Receiver::get_basis.
Definition Archive.C:234
virtual void set_nchan(unsigned numchan)=0
Set the number of frequency channels.
virtual Signal::Scale get_scale() const =0
Get the scale in which flux density is measured.
ExtensionType * get()
Template method searches for an Extension of the specified type.
virtual unsigned get_nextension() const
Return the number of extensions available.
Definition Archive.C:131
virtual std::string get_source() const =0
Get the source name.
void init_Integration(Integration *subint, bool check_phase=false)
Initialize an Integration to reflect Archive attributes.
Definition Archive_init_Integration.C:34
void unload(const std::string &filename) const
Convenience interface to Archive::unload (const char*)
Definition Archive.h:104
void create_updated_model(bool clear_model)
Creates polynomials to span the Integration set.
Definition Archive_update_model.C:109
virtual void set_poln_calibrated(bool done=true)=0
Set the value to be returned by get_poln_calibrated.
virtual unsigned get_nchan() const =0
Get the number of frequency channels used.
virtual Integration * load_Integration(const char *filename, unsigned subint)=0
Load the specified Integration from filename, returning new instance.
virtual bool get_poln_calibrated() const =0
Data has been calibrated for polarimetric response of instrument.
void centre(double phase_offset=0.5)
Phase rotate pulsar Integrations so that pulse phase zero is centred.
Definition Archive_centre.C:18
virtual void set_dedispersed(bool done=true)=0
Set the value to be returned by get_dedispersed.
virtual void set_dispersion_measure(double dm)=0
Set the dispersion measure (in )
Profile * get_Profile(unsigned subint, unsigned pol, unsigned chan)
Return pointer to the specified profile.
Definition Archive.C:270
bool good_model(const Predictor *test_model) const
Returns true if the given model spans the Integration set.
Definition Archive_good_model.C:23
void set_calibrator_match(Match *)
The default baseline removal strategy.
Definition Archive_match.C:71
virtual void set_telescope(const std::string &code)=0
Set the name of the telescope used.
Reference::To< Expert > expert_interface
Expert interface.
Definition Archive.h:688
MJD end_time() const
Return the MJD at the end of the last sub-integration.
Definition Archive.C:317
virtual void resize(unsigned nsubint, unsigned npol=0, unsigned nchan=0, unsigned nbin=0)
Resize the Integration vector with new_Integration instances.
Definition Archive_resize.C:26
void update_model()
Create a new predictor and align the Integrations to the new model.
Definition Archive_update_model.C:31
virtual void load_header(const char *filename)=0
Load the header information from filename.
void defaraday()
Correct the Faraday rotation of Q into U.
Definition Archive_defaraday.C:26
const Match * get_mixable() const
Policy determines if data can be combined/integrated.
Definition Archive_match.C:89
static void agent_report()
Report on the status of the plugins.
Definition Archive.C:120
void update_centre_frequency()
Update the centre frequency.
Definition Archive_update_centre_frequency.C:15
void remove_chan(unsigned first, unsigned last)
Delete the specified inclusive channel range from the Archive.
Definition Archive_remove_chan.C:12
bool has() const
Template method searches for an Extension of the specified type.
Definition ArchiveExtension.h:98
static Option< bool > unload_cull_predictor
Default policy for culling predictor coefficients when unloading.
Definition Archive.h:607
Reference::To< Match > standard_match_policy
The pulsar ephemeris, as used by TEMPO.
Definition Archive.h:693
Archive()
Default constructor.
Definition Archive.C:67
static Option< bool > no_clobber
Default policy for overwriting archive files.
Definition Archive.h:610
void set_mixable(Match *)
The default baseline removal strategy.
Definition Archive_match.C:95
virtual void set_bandwidth(double bw)=0
Set the overall bandwidth of the observation.
bool mixable(const Archive *arch, std::string &reason) const
Test if arch is mixable (enough for append)
Definition Archive_match.C:29
void append(const Archive *archive)
Append the Integrations from the specifed archive.
Definition Archive_append.C:20
static Archive * new_Archive(const std::string &class_name)
Factory returns a null-constructed instance of the named class.
Definition Archive.C:104
bool processing_match(const Archive *arch, std::string &reason) const
Test if arch matches (enough for a pulsar - pulsar match)
Definition Archive_match.C:40
void fscrunch_to_nchan(unsigned new_nchan)
Call fscrunch with the appropriate value.
Definition Archive_fscrunch.C:37
PhaseWeight * baseline() const
Return a new PhaseWeight instance with the baseline phase bins masked.
Definition Archive_baseline.C:11
Integration * use_Integration(Integration *)
Return the given Integration ready for use.
Definition Archive_init_Integration.C:23
void refresh()
Completely reload the archive, deleting all data.
Definition Archive.C:243
bool standard_match(const Archive *arch, std::string &reason) const
Test if arch matches (enough for a pulsar - standard match)
Definition Archive_match.C:34
Archive * tscrunched() const
Return pointer to a new tscrunched clone.
Definition Archive_tscrunched.C:18
static Option< std::string > unload_class
Name of class to which data are converted if unload_file unimplemented.
Definition Archive.h:604
ExtensionType * getadd()
Template method returns an Extension of the specified type.
Archive & operator=(const Archive &a)
Assignment operator.
Definition Archive.C:97
void transform(const Jones< float > &)
Perform the transformation on each polarimetric profile.
Definition Archive_transform.C:15
void tscrunch(unsigned nscrunch=0)
Integrate profiles in time.
Definition Archive_tscrunch.C:17
virtual void add_extension(Extension *extension)
Add an Extension to the Archive instance.
Definition Archive.C:186
StrategySet * get_strategy() const
Returns the strategy manager.
Definition StrategySet.C:192
virtual sky_coord get_coordinates() const =0
Get the coordinates of the source.
Archive * total(bool tscrunch=true) const
Return pointer to a new fscrunched, tscrunched and pscrunched clone.
Definition Archive_total.C:19
void apply_model(Integration *subint, const Predictor *old=0)
Apply the current model to the Integration.
Definition Archive_apply_model.C:26
void update()
Update the current archive, saving current Integration data.
Definition Archive.C:253
const ExtensionType * get() const
Template method searches for an Extension of the specified type.
void fscrunch(unsigned nscrunch=0)
Integrate profiles in frequency.
Definition Archive_fscrunch.C:18
void centre_max_bin(double phase_offset=0.5)
Phase rotate pulsar Integrations so centre the maximum amplitude.
Definition Archive_centre_max_bin.C:16
virtual Archive * clone() const =0
Return a new copy constructed instance equal to this.
void uniform_weight(float new_weight=1.0)
Set the weight of each profile to the given number.
Definition Archive.C:347
static Functor< void(Archive *) > remove_baseline_strategy
The default baseline removal strategy.
Definition Archive.h:577
double integration_length() const
Returns the total time integrated into all Integrations (in seconds)
Definition Archive.C:326
static void set_verbosity(unsigned level)
Set the verbosity level (0 to 3)
Definition Archive_verbose.C:19
void set_model(const Predictor *model, bool apply=true)
Install the given predictor and shift profiles to align.
Definition Archive_set_model.C:14
Reference::To< Match > mixable_policy
The pulsar ephemeris, as used by TEMPO.
Definition Archive.h:696
void rotate_phase(double phase)
Rotate each profile by phase.
Definition Archive_rotate.C:18
virtual bool get_faraday_corrected() const =0
Data has been corrected for ISM faraday rotation.
virtual void erase(unsigned isubint)
Remove the specified sub-integration.
Definition Archive_resize.C:94
virtual Signal::State get_state() const =0
Get the state of the profile data.
const Match * get_calibrator_match() const
Policy determines if a calibrator matches an observation.
Definition Archive_match.C:65
void convert_state(Signal::State state)
Convert data to the specified state.
Definition Archive_convert_state.C:14
bool has_ephemeris() const
Return true if the Archive has an ephemeris.
Definition Archive.h:321
virtual const Extension * get_extension(unsigned iextension) const
Return a pointer to the specified extension.
Definition Archive.C:158
Reference::To< Match > processing_match_policy
The pulsar ephemeris, as used by TEMPO.
Definition Archive.h:695
virtual void set_centre_frequency(double cf)=0
Set the centre frequency of the observation.
const Parameters * get_ephemeris() const
Return a pointer to the current archive ephemeris.
Definition Archive.C:281
virtual void set_faraday_corrected(bool done=true)=0
Set the value to be returned by get_ism_rm_corrected.
void resize_Integration(Integration *integration)
Provide Integration::resize access to Archive-derived classes.
Definition Archive_resize.C:88
virtual void unload_file(const char *filename) const =0
Unload the Archive (header and Integration data) to filename.
void set_standard_match(Match *)
The default baseline removal strategy.
Definition Archive_match.C:59
Expert * expert()
Provide access to the expert interface.
Definition Archive.C:40
double weighted_frequency(unsigned ichan, unsigned start, unsigned end) const
Computes the weighted channel frequency over an Integration interval.
Definition Archive_weighted_frequency.C:23
void bscrunch_to_nbin(unsigned new_nbin)
Call bscrunch with the appropriate value.
Definition Archive_bscrunch.C:16
virtual double get_rotation_measure() const =0
Get the rotation measure (in )
static void agent_list()
List the successfully loaded plugins.
Definition Archive.C:125
void rotate(double time)
Phase rotate each profile by time seconds.
Definition Archive_rotate.C:12
virtual std::string get_telescope() const =0
Get the name of the telescope used.
Reference::To< Interface > text_interface
Text interface.
Definition Archive.h:691
void set_filename(const std::string &filename)
Set the filename of the Archive.
Definition Archive.h:114
std::string get_filename() const
Get the name of the file to which the archive will be unloaded.
Definition Archive.h:108
Archive * extract(std::vector< unsigned > &subints) const
Return pointer to a new instance with only the specified subints.
Definition Archive_extract.C:18
bool calibrator_match(const Archive *arch, std::string &reason) const
Test if arch matches (enough for a pulsar - calibrator match)
Definition Archive_match.C:47
static Archive * load(const std::string &name)
Factory returns a new instance loaded from filename.
Definition Archive_load.C:28
void set_ephemeris(const Parameters *ephemeris, bool update=true)
Install the given ephemeris and call update_model.
Definition Archive_set_ephemeris.C:17
virtual void set_rotation_measure(double rm)=0
Set the rotation measure (in )
void invint()
Transform Stokes I,Q,U,V into the polarimetric invariant interval.
Definition Archive_invint.C:11
void reverse_chan()
Reverse the order of frequency channels.
Definition Archive.C:225
void copy(const Archive &)
Copy all base class attributes, Extensions, and Integrations.
Definition Archive_copy.C:24
virtual void set_npol(unsigned numpol)=0
Set the number of polarization measurements.
virtual void set_nbin(unsigned numbins)=0
Set the number of pulsar phase bins.
virtual void set_source(const std::string &source)=0
Set the source name.
virtual Signal::Source get_type() const =0
Get the observation type (psr, cal)
float find_min_phase(float dc=0.15) const
Returns the centre phase of the region with minimum total intensity.
Definition Archive_find.C:56
virtual unsigned get_npol() const =0
Get the number of polarizations.
const Match * get_processing_match() const
Policy determines if data were processed identically.
Definition Archive_match.C:77
virtual bool can_unload() const =0
Return true if the unload method is implemented.
Reference::To< Parameters > ephemeris
The pulsar ephemeris, as used by TEMPO.
Definition Archive.h:657
bool type_is_cal() const
Return true if the observation is a calibrator.
Definition Archive.C:339
void unload(const char *filename=0) const
Write the archive to filename.
Definition Archive_unload.C:36
MJD start_time() const
Return the MJD at the start of the first sub-integration.
Definition Archive.C:308
const Predictor * get_model() const
Return a pointer to the current phase predictor.
Definition Archive.C:290
Reference::To< Match > calibrator_match_policy
The pulsar ephemeris, as used by TEMPO.
Definition Archive.h:694
void remove_baseline()
Remove the baseline from all profiles.
Definition Archive_remove_baseline.C:17
virtual void set_type(Signal::Source type)=0
Set the observation type (psr, cal)
std::string unload_filename
Name of file to which the archive will be written on call to unload()
Definition Archive.h:625
bool zero_phase_aligned() const
Return true if all Integration::zero_phase_aligned flags are set.
Definition Archive.C:353
virtual double get_centre_frequency() const =0
Get the centre frequency of the observation.
void set_predictor(Predictor *model)
Set the phase predictor attribute without any computation.
Definition Archive.C:302
void find_transitions(int &hi2lo, int &lo2hi, int &buffer) const
Find the transitions between high and low states in total intensity.
Definition Archive_find.C:23
float find_max_phase() const
Returns the centre phase of the region with maximum total intensity.
Definition Archive_find.C:72
virtual Interface * get_interface()
Return a text interface that can be used to access this instance.
Definition Archive.C:52
virtual void set_state(Signal::State state)=0
Set the state of the profile data.
const Match * get_standard_match() const
Policy determines if a standard/template matches an observation.
Definition Archive_match.C:53
void find_peak_edges(int &rise, int &fall) const
Find the bins in which the total intensity exceeds a threshold.
Definition Archive_find.C:40
float rms_baseline(float dc=0.4)
Returns geometric mean of baseline RMS for each Integration.
Definition Archive_rms_baseline.C:17
static unsigned get_instance_count()
Returns the number of Archive instances currently in existence.
Definition Archive.C:62
virtual void set_scale(Signal::Scale scale)=0
Set the scale in which flux density is measured.
virtual unsigned get_nbin() const =0
Get the number of pulsar phase bins used.
void pscrunch()
Integrate profiles in polarization.
Definition Archive_pscrunch.C:16
void bscrunch(unsigned nscrunch)
Integrate pulse profiles in phase.
Definition Archive_bscrunch.C:31
void dedisperse()
Rotate the Profiles to remove dispersion delays b/w chans.
Definition Archive_dedisperse.C:16
void set_processing_match(Match *)
The default baseline removal strategy.
Definition Archive_match.C:83
void fold(unsigned nfold)
Integrate neighbouring sections of the pulse profiles.
Definition Archive_fold.C:15
bool has_model() const
Returns true if the Archive has a model.
Definition Archive.h:330
virtual double get_bandwidth() const =0
Get the overall bandwidth of the observation.
virtual double get_dispersion_measure() const =0
Get the dispersion measure (in )
IntegrationManager()
null constructor
Definition IntegrationManager.C:17
Array of Profiles integrated over the same time interval.
Definition Integration.h:37
Configuration option.
Definition Config.h:69
Stores a weight for each Profile phase bin.
Definition PhaseWeight.h:24
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
Contains information about the receiver and receiver platform.
Definition Receiver.h:23
Defines the PSRCHIVE library.
Definition CalSource.h:17
bool in_frequency_order(const Archive *A, const Archive *B)
Return true if A precedes B in frequency order of channels.
Definition Archive.C:373
void phase(Profile *input)
Compute the phase of the input complex-valued Profile.
Definition Fourier.C:135

Generated using doxygen 1.14.0