Weight.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/More/General/Pulsar/Weight.h
10
11#ifndef _Pulsar_Weight_H
12#define _Pulsar_Weight_H
13
14#include "Pulsar/Algorithm.h"
15#include "Pulsar/ScrunchFactor.h"
16#include "TextInterface.h"
17
18namespace Pulsar {
19
20 class Archive;
21 class Integration;
22
24 class Weight : public Algorithm {
25
26 public:
27
29 Weight ();
30
32 virtual void operator () (Archive*);
33
36
38 class Interface;
39
42
44 const ScrunchFactor get_fscrunch () const { return fscrunch_factor; }
45
46 protected:
47
49 virtual void weight (Integration*) = 0;
50
52 void copy_weights (const Integration* from, Integration* to);
53
56
57 };
58
59}
60
61#endif
62
Data manipulation implementations.
Definition Algorithm.h:19
The primary interface to pulsar observational data.
Definition Archive.h:46
Array of Profiles integrated over the same time interval.
Definition Integration.h:37
Manages a combined scrunch factor or target dimension.
Definition ScrunchFactor.h:21
Weight()
Default constructor.
Definition Weight.C:12
void copy_weights(const Integration *from, Integration *to)
Copy the weights from 'from' to 'to'.
Definition Weight.C:39
ScrunchFactor fscrunch_factor
Compute weights from fscrunched clone of data, then apply to original.
Definition Weight.h:55
virtual void weight(Integration *)=0
Set the weight of each frequency channel in the sub-integration.
virtual void operator()(Archive *)
Set the weights of all Profiles in the Archive.
Definition Weight.C:17
const ScrunchFactor get_fscrunch() const
Get the frequency scrunch factor.
Definition Weight.h:44
void set_fscrunch(const ScrunchFactor &f)
Set the frequency scrunch factor.
Definition Weight.h:41
virtual TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition Weight.C:66
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0