77 virtual int Init(
int argc,
char** argv)
128 void AddModel(
const char *name,
char *format,
char *b64);
181 void AddNode(
const char *name,
dsp_location *locations,
void *buf,
int len, timespec starttime,
bool geo);
194 void Plot(
const char *name,
int flags);
202 void Idft(
const char *name,
const char *magnitude,
const char *phase);
210 void Dft(
const char *name,
const char *magnitude,
const char *phase);
218 void Mask(
const char *name,
const char *model,
const char *mask);
226 void Stack(
const char *name,
const char *model1,
const char *model2);
234 void Diff(
const char *name,
const char *model1,
const char *model2);
242 void Convolute(
const char *name,
const char *model1,
const char *model2);
250 void LowPass(
const char *name,
const char *node,
double freq);
258 void HighPass(
const char *name,
const char *node,
double freq);
267 void BandPass(
const char *name,
const char *node,
double lofreq,
double hifreq);
276 void BandReject(
const char *name,
const char *node,
double lofreq,
double hifreq);
288 inline virtual void SetRa(
double value)
470 FILE *input, *output;
Inherit this class to create an OpenVLBI server application.
Definition: vlbi_server.h:61
double GetBps(void)
Get the bytes per sample.
Definition: vlbi_server.h:387
void AddNode(const char *name, dsp_location *locations, void *buf, int len, timespec starttime, bool geo)
Create a new node from a its raw data, give it a name and add it to the current context.
void HighPass(const char *name, const char *node, double freq)
Apply a high pass filter on a node buffer.
double GetFreq(void)
Get the current frequency.
Definition: vlbi_server.h:369
void AddContext(const char *name)
Add a new OpenVLBI context by giving it a name. VLBI::Server has an internal context collection.
void DelNode(const char *name)
Delete from the current context an existing node by name.
void Mask(const char *name, const char *model, const char *mask)
Mask a model with another model by multiplication.
double GetRa(void)
Get the current right ascension coordinate.
Definition: vlbi_server.h:351
void BandReject(const char *name, const char *node, double lofreq, double hifreq)
Apply a band reject filter on a node buffer.
void LowPass(const char *name, const char *node, double freq)
Apply a low pass filter on a node buffer.
void DelContext(const char *name)
Delete an existing OpenVLBI context by name.
void Dft(const char *name, const char *magnitude, const char *phase)
Save the magnitude and phase to new models obtained by the fourier transform of the model passed.
void Idft(const char *name, const char *magnitude, const char *phase)
Obtain an inverse fourier transform from the magnitude and phase models passed.
void Convolute(const char *name, const char *model1, const char *model2)
Convolute a model with a convolution matrix model.
FILE * GetOutput()
Get the output stream.
Definition: vlbi_server.h:441
char * CurrentContext(void)
Obtain the name current OpenVLBI context.
Definition: vlbi_server.h:117
vlbi_context GetContext(void)
Obtain the current OpenVLBI context object.
Server(void)
Constructor, initializes all the internal variables.
vlbi_func2_t getDelegate()
Get the current delegate function.
Definition: vlbi_server.h:459
virtual void SetSampleRate(double value)
Set the sampling frequency, do this before calling Plot()
Definition: vlbi_server.h:315
void setDelegate(vlbi_func2_t func)
Set the delegate function.
Definition: vlbi_server.h:450
void AddModel(const char *name, char *format, char *b64)
Create a new model from a picture, give it a name and add it to the current context.
void Shift(const char *name)
Shift a model by its dimension in-place.
void Diff(const char *name, const char *model1, const char *model2)
Diff a model with another model.
virtual ~Server(void)
Destructor, destroys this object.
virtual void SetHeight(int value)
Set the plot height, do this before calling Plot()
Definition: vlbi_server.h:342
void SetContext(const char *name)
Set the current OpenVLBI context by passing its name.
virtual int Init(int argc, char **argv)
Called immediately after main(), can be overriden to add your custom arguments.
Definition: vlbi_server.h:77
double GetDec(void)
Get the current declination coordinate.
Definition: vlbi_server.h:360
void DelModel(const char *name)
Delete from the current context an existing model by name.
double GetHeight(void)
Get the plot height.
Definition: vlbi_server.h:405
double GetWidth(void)
Get the plot width.
Definition: vlbi_server.h:396
char * GetModel(const char *name, char *format)
Obtain the base64 encoded file buffer of a model by passing its name.
virtual void SetRa(double value)
Set the target right ascension coordinate, do this before calling Plot()
Definition: vlbi_server.h:288
void Plot(const char *name, int flags)
Plot the current observation into a new model.
void AddNode(const char *name, char *b64)
Create a new node from a monodimensional image FITS file, give it a name and add it to the current co...
virtual void SetBps(int value)
Set the bytes per sample, do this before calling AddNode()
Definition: vlbi_server.h:324
void Stack(const char *name, const char *model1, const char *model2)
Stack a model with another model.
void AddNodes(const char *name, char *b64)
Create as many nodes as the rows number of an SDFITS file, give it a name and add it to the current c...
virtual void SetWidth(int value)
Set the plot width, do this before calling Plot()
Definition: vlbi_server.h:333
void SetInput(FILE *in)
Set the input stream.
Definition: vlbi_server.h:414
void BandPass(const char *name, const char *node, double lofreq, double hifreq)
Apply a band pass filter on a node buffer.
double GetSampleRate(void)
Get the current sample rate.
Definition: vlbi_server.h:378
FILE * GetInput()
Get the input stream.
Definition: vlbi_server.h:423
void SetOutput(FILE *out)
Set the output stream.
Definition: vlbi_server.h:432
virtual void SetDec(double value)
Set the target declination coordinate, do this before calling Plot()
Definition: vlbi_server.h:297
dsp_stream_p GetModel(const char *name)
Obtain the dsp_stream_p object of a model by passing its name.
virtual void SetFreq(double value)
Set the frequency observed, do this before calling Plot()
Definition: vlbi_server.h:306
virtual void Parse(void)
main() creates a loop that calls Parse(), you can use this one, which uses the standard syntax or ove...
int GetModels(char **names)
Get the names of all the models of the current context.
vlbi_plot_flags
Flags that characterize a plot.
Definition: vlbi_server.h:46
@ plot_flags_uv_coverage
This will fill all baselines projected pixels with ones.
Definition: vlbi_server.h:50
@ plot_flags_moving_baseline
This indicates that the nodes have a positional stream companion.
Definition: vlbi_server.h:48
@ plot_flags_synced
This indicates that the nodes are synced already and no delay calculation will be done.
Definition: vlbi_server.h:52
@ plot_flags_custom_delegate
This will use a custom visibility delegate.
Definition: vlbi_server.h:54
double(* vlbi_func2_t)(double, double)
The delegate function type to pass to vlbi_plot_uv_plane.
Definition: vlbi.h:337
void * vlbi_context
the OpenVLBI context object type
Definition: vlbi.h:340
Contains a set of informations and data relative to a buffer and how to use it.
Definition: dsp.h:363
The location type.
Definition: dsp.h:328