ScintArchive.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2005 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/Base/Formats/Timer/Pulsar/ScintArchive.h
10 
11 #ifndef __Scint_Archive_h
12 #define __Scint_Archive_h
13 
14 #include "TimerArchive.h"
15 #include "baseband_header.h"
16 
17 #include "Pulsar/Passband.h"
18 #include "Pulsar/dspReduction.h"
19 #include "Pulsar/TwoBitStats.h"
20 
21 namespace Pulsar {
22 
24  class ScintArchive : public TimerArchive {
25 
26  public:
27 
30 
32  ScintArchive (const ScintArchive& archive);
33 
35  ~ScintArchive ();
36 
38  const ScintArchive& operator = (const ScintArchive& archive);
39 
41  void copy (const Archive& archive);
42 
44  virtual ScintArchive* clone () const;
45 
46  // //////////////////////////////////////////////////////////////////
47  //
48  // ScintArchive specific
49  //
50 
52  const std::vector<float>& get_passband (unsigned channel) const;
53 
54  bool takes (const ScintArchive* archive) const;
55 
56  void integrate (const ScintArchive* archive);
57 
58  protected:
59 
60  std::vector< std::vector<float> > spectra;
61 
62  friend class Archive::Advocate<ScintArchive>;
63 
64  // Advocates the use of the ScintArchive plugin
65  class Agent : public Archive::Advocate<ScintArchive> {
66 
67  public:
68 
70  Agent () {}
71 
73  bool advocate (const char* filename);
74 
76  std::string get_name () { return "Scint"; }
77 
79  std::string get_description ();
80 
81  };
82 
84  void init_spectra ();
85 
87  void backend_load (FILE* fptr);
88 
90  void backend_unload (FILE* fptr) const;
91 
93  void correct ();
94 
95  void set_be_data_size ();
96 
97  };
98 
99 
100 }
101 
102 #endif
103 
104 
ScintArchive()
Default constructor.
Definition: ScintArchive.C:23
virtual ScintArchive * clone() const
Return a pointer to a new copy constructed instance equal to this.
Definition: ScintArchive.C:95
void backend_unload(FILE *fptr) const
Unload ScintArchive specific information.
Definition: ScintArchive.C:201
const float * get_amps() const
Return a pointer to the amplitudes array.
Definition: ProfileAmps.C:141
const std::vector< float > & get_passband(unsigned channel) const
Return a reference to the bandpass in the given channel.
Definition: ScintArchive.C:223
const ScintArchive & operator=(const ScintArchive &archive)
Assignment operator.
Definition: ScintArchive.C:55
The primary interface to pulsar observational data.
Definition: Archive.h:45
void backend_load(FILE *fptr)
Load ScintArchive specific information.
Definition: ScintArchive.C:158
void correct()
Over-ride TimerArchive::correct.
Definition: ScintArchive.C:149
~ScintArchive()
Destructor.
Definition: ScintArchive.C:45
void copy(const Archive &archive)
Copy all of the class attributes and the selected Integration data.
Definition: ScintArchive.C:67
void set_be_data_size()
set the backend data size
Definition: ScintArchive.C:128
Returns power estimates from a ScintArchive.
Definition: ScintPowerEstimator.h:26
Defines the PSRCHIVE library.
Definition: CalSource.h:17
const Profile * get_Profile(const Archive *data, Index subint, Index pol, Index chan)
Return the requested profile, cloning and integrating when needed.
Definition: Index.C:24
A TimerArchive with transposed phase and frequency axis.
Definition: ScintArchive.h:29
void init_spectra()
Update the spectra attribute.
Definition: ScintArchive.C:181

Generated using doxygen 1.8.17