StandardFlux.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2010 by Paul Demorest
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __Pulsar_StandardFlux_h
10 #define __Pulsar_StandardFlux_h
11 
12 #include "Pulsar/Flux.h"
13 #include "Pulsar/ProfileShiftFit.h"
14 #include "Estimate.h"
15 
16 namespace Pulsar
17 {
18  class Profile;
19 
21  class StandardFlux : public Flux
22  {
23  public:
24 
27 
29  ~StandardFlux();
30 
33 
35  std::string get_method() const { return "StandardFlux"; }
36 
38  void set_standard(const Profile *p);
39 
41  void set_fit_shift(bool _fit=true) { fit_shift=_fit; }
42 
43  protected:
44 
47 
50 
52  double stdfac;
53 
55  double sumstd;
56 
58  double sumstd2;
59 
61  bool fit_shift;
62 
63  };
64 
65 }
66 
67 #endif
~StandardFlux()
Destructor.
Definition: StandardFlux.C:23
void set_standard(const Profile *p)
Set the standard profile to use.
Definition: StandardFlux.C:27
StandardFlux()
Default constructor.
Definition: StandardFlux.C:15
const float * get_amps() const
Return a pointer to the amplitudes array.
Definition: ProfileAmps.C:141
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
double sumsq(int bin_start=0, int bin_end=0) const
Returns the sum of all amplitudes squared.
Definition: Profile.C:722
Estimate< double > get_flux(const Profile *p)
Return flux w/ uncertainty.
Definition: StandardFlux.C:48
unsigned get_nbin() const
Return the number of bins.
Definition: ProfileAmps.h:50
bool fit_shift
Fit shift or just scale.
Definition: StandardFlux.h:66
double sumstd2
Sum of squared std values.
Definition: StandardFlux.h:63
double sumstd
Sum of std values.
Definition: StandardFlux.h:60
void set_fit_shift(bool _fit=true)
Fit for shift as well as scale.
Definition: StandardFlux.h:46
void set_value(const T &t)
double stdfac
Std normalization factor.
Definition: StandardFlux.h:57
Reference::To< const Profile > stdprof
Standard profile.
Definition: StandardFlux.h:54
Calculates profile shifts by fitting to a template/standard.
Definition: ProfileShiftFit.h:48
std::string get_method() const
Return name of flux algorithm.
Definition: StandardFlux.h:40
Defines the PSRCHIVE library.
Definition: CalSource.h:17
void set_variance(const U &u)
void sum(const Profile *profile)
add profile to this
Definition: Profile.C:336
ProfileShiftFit psf
Shift/scale fit.
Definition: StandardFlux.h:51

Generated using doxygen 1.8.17