Index.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2006 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/General/Pulsar/Index.h
10
11#ifndef __Pulsar_Index_h
12#define __Pulsar_Index_h
13
14#include <iostream>
15
16namespace Pulsar {
17
19 class Index {
20
21 public:
22
24 Index (unsigned value = 0, bool integrate = false);
25
27 unsigned get_value () const { return index; }
29 void set_value (unsigned value) { index = value; integrate = false; }
30
32 bool get_integrate () const { return integrate; }
34 void set_integrate (bool flag = true) { integrate = flag; }
35
37
38 bool get_extension () const { return extension; }
40
41 void set_extension (bool flag = true) { extension = flag; }
42
43 protected:
44
45 unsigned index;
46 bool integrate;
47 bool extension;
48 };
49
50 std::ostream& operator << (std::ostream& os, const Index&);
51 std::istream& operator >> (std::istream& is, Index&);
52
53 class Archive;
54 class Integration;
55
57 const Integration*
58 get_Integration (const Archive* data, Index subint);
59
60 class Profile;
61
63 const Profile*
64 get_Profile (const Archive* data,
65 Index subint, Index pol, Index chan);
66
67 const Profile*
68 get_Profile (const Integration* data, Index pol, Index chan);
69
70 class PolnProfile;
71
73
74 const PolnProfile*
75 get_Stokes (const Archive* data, Index subint, Index chan);
76
77 const PolnProfile*
78 get_Stokes (const Integration* data, Index chan);
79}
80
81#endif
The primary interface to pulsar observational data.
Definition Archive.h:46
Array of Profiles integrated over the same time interval.
Definition Integration.h:37
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
void set_value(unsigned value)
Set the value of the index.
Definition Index.h:29
bool get_integrate() const
Get the integrate flag.
Definition Index.h:32
Index(unsigned value=0, bool integrate=false)
Default constructor.
Definition Index.C:16
void set_extension(bool flag=true)
Set the extension flag.
Definition Index.h:41
void set_integrate(bool flag=true)
Set the integrate flag.
Definition Index.h:34
bool get_extension() const
Get the extension flag.
Definition Index.h:38
unsigned get_value() const
Get the value of the index.
Definition Index.h:27
Defines the PSRCHIVE library.
Definition CalSource.h:17
const Integration * get_Integration(const Archive *data, Index subint)
Return the requested profile, cloning and integrating when needed.
Definition Index.C:118
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
const PolnProfile * get_Stokes(const Archive *data, Index subint, Index chan)
Return a new PolnProfile with state == Signal::Stokes.
Definition Index.C:158

Generated using doxygen 1.14.0