Open source Very Long Baseline Interferometry
OpenVLBI
Functions

Functions

DLL_EXPORT double vlbi_astro_mean_speed (double speed)
 Obtain or set the reference constant speed of the radiation to measure. More...
 
DLL_EXPORT void vlbi_astro_alt_az_from_ra_dec (double J2000time, double Ra, double Dec, double Lat, double Long, double *Alt, double *Az)
 Obtain the altitude and azimuth coordinate of a celestial coordinate at a specific time. More...
 
DLL_EXPORT double vlbi_astro_get_local_hour_angle (double local_sideral_time, double ra)
 Returns local hour angle of an object. More...
 
DLL_EXPORT void vlbi_astro_get_alt_az_coordinates (double hour_angle, double dec, double latitude, double *alt, double *az)
 Returns alt-azimuth coordinates of an object. More...
 
DLL_EXPORT dsp_stream_p vlbi_astro_load_spectrum (char *filename)
 Load a spectrum file. More...
 
DLL_EXPORT int vlbi_astro_load_spectra_catalog (char *path, dsp_stream_p **catalog, int *catalog_size)
 Load a spectrum file catalog. More...
 
DLL_EXPORT dsp_stream_p vlbi_astro_create_reference_catalog (dsp_stream_p *catalog, int catalog_size)
 Create a dsp_stream_p containing all the spectral lines of all elements of a catalog. More...
 
DLL_EXPORT void vlbi_astro_save_spectrum (dsp_stream_p stream, char *filename)
 Save a spectrum stream into a file. More...
 
DLL_EXPORT void vlbi_astro_scan_spectrum (dsp_stream_p stream, int sample_size)
 Scan a dsp_stream_p and detect the relevant spectral lines. More...
 
DLL_EXPORT dsp_align_info vlbi_astro_align_spectra (dsp_stream_p spectrum, dsp_stream_p catalog, int max_lines, double decimals, double min_score)
 Align a spectrum to a reference catalog. More...
 
DLL_EXPORT double vlbi_astro_diff_spectra (dsp_stream_p spectrum0, dsp_stream_p spectrum, double decades)
 Compare a spectrum to a reference one. More...
 
DLL_EXPORT double vlbi_astro_flux_ratio (double flux0, double flux, double delta_spectrum)
 Returns the flux ratio of two objects. More...
 
DLL_EXPORT double vlbi_astro_estimate_brightness_temperature (double wavelength, double flux)
 Estimate the brightness temperature from a flux. More...
 
DLL_EXPORT double vlbi_astro_estimate_temperature (double wavelength, double flux)
 Estimate the physical temperature with a given flux. More...
 
DLL_EXPORT double vlbi_astro_estimate_flux (double wavelength, double temperature)
 Estimate the flux from a physical temperature. More...
 
DLL_EXPORT double vlbi_astro_estimate_temperature_ratio (double rad_ratio, double flux_ratio)
 Returns the temperature ratio of two objects. More...
 
DLL_EXPORT double vlbi_astro_estimate_size_ratio (double luminosity_ratio, double temperature_ratio)
 Returns the size ratio of two objects. More...
 
DLL_EXPORT double vlbi_astro_estimate_luminosity_ratio (double size_ratio, double flux_ratio)
 Returns the luminosity ratio between two celestial objects. More...
 
DLL_EXPORT double vlbi_astro_estimate_distance_ratio (double luminosity_ratio, double flux_ratio)
 Returns the distance ratio of two celestial object. More...
 
DLL_EXPORT double vlbi_astro_estimate_distance_parallax (double rad, double baseline)
 Returns the distance of an object from its parallax. More...
 
DLL_EXPORT double vlbi_astro_estimate_redshift (double wavelength0, int wavelength)
 Returns the redshift of an object. More...
 
DLL_EXPORT double vlbi_astro_estimate_size_transient (double transient_object_velocity, double transit_time)
 Returns the size of an object by the observation of a transient body. More...
 
DLL_EXPORT double vlbi_astro_redshift_adjust (double distance, double redshift)
 Returns the distance of a far object adjusted with its measured redshift. More...
 
DLL_EXPORT dsp_stream_p vlbi_file_read_fits (char *filename)
 Returns the distance of a far object adjusted with its measured redshift. More...
 
DLL_EXPORT dsp_stream_pvlbi_file_read_sdfits (char *filename, long *n)
 Returns the distance of a far object adjusted with its measured redshift. More...
 

Detailed Description

Function Documentation

◆ vlbi_astro_align_spectra()

DLL_EXPORT dsp_align_info vlbi_astro_align_spectra ( dsp_stream_p  spectrum,
dsp_stream_p  catalog,
int  max_lines,
double  decimals,
double  min_score 
)
Parameters
spectrumThe spectrum to analyze
catalogA catalog of spectra to compare
max_linesThe perfomance-needed limit of lines used for comparison
decimalsThe number of decimals used in comparison
min_scoreThe trigger matching score percent to reach
Returns
An dsp_align_info structure containing the calculated offset and scale ratio

◆ vlbi_astro_alt_az_from_ra_dec()

DLL_EXPORT void vlbi_astro_alt_az_from_ra_dec ( double  J2000time,
double  Ra,
double  Dec,
double  Lat,
double  Long,
double *  Alt,
double *  Az 
)
Parameters
J2000timeCurrent time offset in seconds from J2000
RaRight ascension coordinate of the object
DecDeclination coordinate of object
LatLatitude of the observatory
LongLongitude of the observatory
AltAltitude pointer
AzAzimuth pointer

◆ vlbi_astro_create_reference_catalog()

DLL_EXPORT dsp_stream_p vlbi_astro_create_reference_catalog ( dsp_stream_p catalog,
int  catalog_size 
)
Parameters
catalogA catalog of spectra
catalog_sizeThe size of the catalog
Returns
A dsp_stream_p structure containing all the spectral lines of the catalog spectra

◆ vlbi_astro_diff_spectra()

DLL_EXPORT double vlbi_astro_diff_spectra ( dsp_stream_p  spectrum0,
dsp_stream_p  spectrum,
double  decades 
)
Parameters
spectrum0The reference spectrum
spectrumThe spectrum to analyze
decadesThe number of decades used in comparison
Returns
An estimation of the temperature difference between the two spectra

◆ vlbi_astro_estimate_brightness_temperature()

DLL_EXPORT double vlbi_astro_estimate_brightness_temperature ( double  wavelength,
double  flux 
)
Parameters
wavelengthThe radiation wavelength in meters
fluxThe measured radiation flux
Returns
An estimation of the brightness temperature in Kelvin

◆ vlbi_astro_estimate_distance_parallax()

DLL_EXPORT double vlbi_astro_estimate_distance_parallax ( double  rad,
double  baseline 
)
Parameters
radThe angular distances from the baselines edges
baselineThe baseline
Returns
The distance of the object in same baseline's measure units

◆ vlbi_astro_estimate_distance_ratio()

DLL_EXPORT double vlbi_astro_estimate_distance_ratio ( double  luminosity_ratio,
double  flux_ratio 
)
Parameters
luminosity_ratioThe luminosity ratio
flux_ratioThe ratio between their fluxes
Returns
The ratio of the distance of the two objects

◆ vlbi_astro_estimate_flux()

DLL_EXPORT double vlbi_astro_estimate_flux ( double  wavelength,
double  temperature 
)
Parameters
wavelengthThe radiation wavelength in meters
temperatureThe measured temperature in Kelvin
Returns
An estimation of the temperature the flux on the indicated wavelength

◆ vlbi_astro_estimate_luminosity_ratio()

DLL_EXPORT double vlbi_astro_estimate_luminosity_ratio ( double  size_ratio,
double  flux_ratio 
)
Parameters
size_ratioThe size ratio between the two references
flux_ratioThe ratio of their fluxes
Returns
Their luminosity ratio

◆ vlbi_astro_estimate_redshift()

DLL_EXPORT double vlbi_astro_estimate_redshift ( double  wavelength0,
int  wavelength 
)
Parameters
wavelength0The laboratory reference wavelength
wavelengthThe same wavelength observed on the object
Returns
The redshift error amount

◆ vlbi_astro_estimate_size_ratio()

DLL_EXPORT double vlbi_astro_estimate_size_ratio ( double  luminosity_ratio,
double  temperature_ratio 
)
Parameters
luminosity_ratioThe luminosity ratio
temperature_ratioThe temperature ratio
Returns
The ratio of the two objects' sizes

◆ vlbi_astro_estimate_size_transient()

DLL_EXPORT double vlbi_astro_estimate_size_transient ( double  transient_object_velocity,
double  transit_time 
)
Parameters
transient_object_velocityThe velocity of the transient body
transit_timeThe duration of the transition
Returns
The distance ran by the object during the transit time

◆ vlbi_astro_estimate_temperature()

DLL_EXPORT double vlbi_astro_estimate_temperature ( double  wavelength,
double  flux 
)
Parameters
wavelengthThe radiation wavelength in meters
fluxThe measured radiation flux
Returns
An estimation of the physical temperature in Kelvin

◆ vlbi_astro_estimate_temperature_ratio()

DLL_EXPORT double vlbi_astro_estimate_temperature_ratio ( double  rad_ratio,
double  flux_ratio 
)
Parameters
rad_ratioThe angular sizes ratio
flux_ratioThe flux ratio
Returns
The ratio of the two objects' temperatures

◆ vlbi_astro_flux_ratio()

DLL_EXPORT double vlbi_astro_flux_ratio ( double  flux0,
double  flux,
double  delta_spectrum 
)
Parameters
flux0The angular sizes ratio
fluxThe flux ratio
delta_spectrumThe two objects' spectrum ratio
Returns
The ratio of the two objects' fluxes

◆ vlbi_astro_get_alt_az_coordinates()

DLL_EXPORT void vlbi_astro_get_alt_az_coordinates ( double  hour_angle,
double  dec,
double  latitude,
double *  alt,
double *  az 
)
Parameters
hour_angleHour angle in hours (-12 to 12)
decDEC of object
latitudelatitude in INDI format (-90 to +90)
altALT of object will be returned here
azAZ of object will be returned here

◆ vlbi_astro_get_local_hour_angle()

DLL_EXPORT double vlbi_astro_get_local_hour_angle ( double  local_sideral_time,
double  ra 
)
Parameters
local_sideral_timeLocal Sideral Time
raRA of object
Returns
Hour angle in hours (-12 to 12)

◆ vlbi_astro_load_spectra_catalog()

DLL_EXPORT int vlbi_astro_load_spectra_catalog ( char *  path,
dsp_stream_p **  catalog,
int *  catalog_size 
)
Parameters
pathThe path of the folder containing index.txt
catalogA pointer to an array of dsp_stream_p to be allocated and filled
catalog_sizeThe catalog number of elements passed by reference
Returns
The number of spectra correctly parsed

◆ vlbi_astro_load_spectrum()

DLL_EXPORT dsp_stream_p vlbi_astro_load_spectrum ( char *  filename)
Parameters
filenameThe spectrum file
Returns
a dsp_stream_p containgin the spectral lines in the spectrum file

◆ vlbi_astro_mean_speed()

DLL_EXPORT double vlbi_astro_mean_speed ( double  speed)
Parameters
speedThe speed constant value (Light meters per second for example)
Returns
if speed is less or equal to zero, return the last set or default value, otherwise the value just passed as argument

◆ vlbi_astro_redshift_adjust()

DLL_EXPORT double vlbi_astro_redshift_adjust ( double  distance,
double  redshift 
)
Parameters
distanceThe calculated distance to be adjusted
redshiftThe redshift measurement
Returns
The distance of the object adjusted by its current redshift

◆ vlbi_astro_save_spectrum()

DLL_EXPORT void vlbi_astro_save_spectrum ( dsp_stream_p  stream,
char *  filename 
)
Parameters
streamThe stream containing a spectrum
filenameThe file name where to save the acquired spectrum

◆ vlbi_astro_scan_spectrum()

DLL_EXPORT void vlbi_astro_scan_spectrum ( dsp_stream_p  stream,
int  sample_size 
)
Parameters
streamThe stream containing a spectrum
sample_sizeThe sampling size used for detection

◆ vlbi_file_read_fits()

DLL_EXPORT dsp_stream_p vlbi_file_read_fits ( char *  filename)
Parameters
filenameThe file name of the FITS file to open
Returns
A pointer to a dsp_stream filled with the needed data contained into the FITS file

◆ vlbi_file_read_sdfits()

DLL_EXPORT dsp_stream_p* vlbi_file_read_sdfits ( char *  filename,
long *  n 
)
Parameters
filenameThe file name of the FITS file to open
nthe number of rows extracted and converted into dsp_stream structs
Returns
A pointer array to dsp_stream structs filled with the needed data contained into the SDFITS file rows