programs
- FORTRAN program interfaces¶
-
vdrp.programs.
call_fit2d
(ra, dec, outname, wdir)[source]¶ Call fit2d. Calculate the 2D spatial fit based on fwhm, fiber locations, and ADC. This convolves the PSF over each fiber, for a given input position. It fits the ampltiude, minimizing to a chi^2.
Requires input files generated by run_fit2d
Parameters: - ra : float
Right Ascension of the star.
- dec : float
Declination of the star.
- outname : str
Output filename.
- wdir : str
Name of the work directory
-
vdrp.programs.
call_fitem
(wl, wdir)[source]¶ Call fitem requires input files created by run_fitem
The line fitter. It fits a gauss-hermite. input is fitghsp.in.
Parameters: - wl : float
Wavelength
-
vdrp.programs.
call_fitonevp
(wave, outname, wdir)[source]¶ Call fitonevp
Requires fitghsp.in created by apply_factor_spline
Parameters: - wave : float
Wavelength
- outname : str
Output filename
- wdir : str
Name of the work directory
-
vdrp.programs.
call_getnormexp
(nightshot, wdir)[source]¶ Call getnormexp. Get fwhm and relative normalizations for the frames.
Parameters: - name : str
Observation name
-
vdrp.programs.
call_imextsp
(filename, ifuslot, wl, wlw, tpavg, norm, outfile, wdir)[source]¶ Equivalent of the rextsp script, a wrapper around the imextsp fortran routine.
Extracts the spectrum from the multi fits files and writes the tmp*dat. This also calculates the appropriate photon errors, using counting and sky residual errors. This applies the throughput and fiber to fiber.
Parameters: - filename : str
The filename to process
- ifuslot : str
The ifuslot name
- wl : float
The central extraction wavelength
- wlw : float
The width of the extraction window around wl
- tpavg : float
Throughput average for the spectrum
- norm : str
File with fiber to fiber normaliztion for the spectrum
- outfile : str
Name of the output filename
- wdir : str
Name of the work directory
-
vdrp.programs.
call_mkimage
(ra, dec, starobs, wdir)[source]¶ Call mkimage, equivalent of rmkim
Reads the out2d file and creates three images of the emission line data, best fit model and residuals, called im[123].fits.
Parameters: - ra : float
Right Ascension of the star.
- dec : float
Declination of the star.
- starobs : list
List of StarObservation objects for the star
-
vdrp.programs.
call_mkimage3d
(wdir)[source]¶ Run the mkimage3d command, creating an output file called image3d.fits
-
vdrp.programs.
call_sumspec
(starname, wdir)[source]¶ Call sumpspec. Sums a set of spectra, and then bins to 100AA bins. Used for SED fitting.
Parameters: - starname : str
Star name used to create the outputn filename (adds specf.dat)
-
vdrp.programs.
call_sumsplines
(nspec, wdir)[source]¶ Call sumsplines, calculate a straight sum of the spectra in a list, including errors. Expects the spectra to be called tmp101 to tmp100+nspec.
Creates a file called splines.out
Parameters: - nspec : int
Number of spectra to read.
- wdir : str
Name of the work directory
-
vdrp.programs.
run_fitradecsp
(ra, dec, step, nstep, w_center, w_range, ifit1, starobs, specfiles, wdir)[source]¶ Setup and call fitradecsp. This creates a file called spec.out
Parameters: - starobs : list
List of StarObservation structures one for each fiber
- specfiles : list
List of filename of the different spec files