API
raccoon.ccf Module
Functions
|
Compute weighted standard deviation. |
|
Compute bisector and its errors. |
|
Compute bisector inverse slope (BIS). |
|
Compute bisector, bisector inverse slope (BIS) and their errors. |
|
Wrapper for the fortran functions ccflibfort.computeccf, ccflibfort.computeccferr, computeccferrfluxorig. |
|
Compute RV error from CCF profile. |
|
Determine which points of the CCF use for the fit. |
|
Gaussian G(x)=shift+amp*e^(-(x-cen)^2/(2*wid^2)) |
|
Fit a Gaussian function to the CCF and return the best fit parameters. |
|
Read CCF data from files created with outfits_ccfall. |
Default masks. |
|
|
Save single CCF data in text file. |
|
Save CCF parameters TS in text file. |
|
Save CCF data in a FITS file. |
|
|
|
|
|
|
|
|
|
Plot order CCFs as given, no normalisation or offset. |
|
3-panel plot with CCFsum, CCFo lines, CCFo map, one below each other. |
|
Plot map of order CCFs as given, no normalisation or offset. |
|
Plot CCF parameters TS (parameter vs BJD). |
|
Plot CCF parameters TS (parameter vs BJD). |
|
stats : {'std', None} |
|
stats : {'std', None} |
|
stats : {'std', None} |
|
2-panel plot with list of CCF (coadded CCFs from different observations) lines color-coded as a function of time, and CCF map with time on y-axis and color-coded on CCF value, one below each other. |
|
stats : list |
|
|
|
vsini selection not implemented!! Parameters ---------- filmask : str Mask-selection file, contaiing the information of the masks to be used. Columns: 0) object used to make the mask objmask 1) spectral type of objmask 2) vsini of objmask 3) path to mask file. |
|
Select mask from default available. |
|
|
List avalilable masks |
|
|
Sum CCFs of different orders. |
raccoon.fitsutils Module
Functions
|
Uses astropy HEADER.extend. |
|
datain : list or tuple of tuples |
|
Read FITS header. |
|
Read keywords in kws from FITS header. |
|
Read keywords in kws from FITS header for the observations in lisobs. |
raccoon.peakutils Module
Functions
|
Check if there is any value in b inside the range of the values in a. |
|
Find the minimum peaks in the spectrum w, f closest to the wavelength positions in the list wlines. |
|
|
|
Find minima and maxima of spectrum f. |
|
|
|
Fit a single Gaussian to a spectrum line. |
|
Fit len(imin) peaks in the spectrum w, f. |
|
Gaussian function: G(x) = shift + amp * e**(-(x-cen)**2 / (2*wid**2)) |
|
|
|
|
|
|
|
|
Find all minima in spectrum. |
|
|
Find "ends of the minima" in spectrum f, i.e. maxima at each side of the minimum. |
|
Find the absolute maxima at each side of the minimum in y. |
|
Find the maxima closest the minimum in y, one at each side. |
raccoon.pyutils Module
Functions
|
Remove path and extension of string s to get the "basename". |
Get OS name. |
|
|
Return True if can convert x to float, return False otherwise. |
|
Check if x is a "valid" float, i.e. a real number, not a nan or inf. |
|
Create directory d if it does not exist. |
|
Save current command. Usually: dirout = args.dirout command = sys.argv. |
|
Uses save_command_current, save_command_history, save_commandlineargs. Usually: dirout = args.dirout command = sys.argv args = args. |
|
Save current command in commands history. Usually: dirout = args.dirout command = sys.argv. |
|
Save current command line arguments. Usually: dirout = args.dirout args = args. |
Classes
|
Custom formatter class for argparse to be able to show default values of options and keep formatting of description and epilog text |
raccoon.spectrographutils Module
Tools to work with data from different spectrographs: CARMENES, HARPS, HARPN. Uses functions from harpsutils and carmenesutils.
Functions
|
|
|
|
|
|
|
|
|
|
|
Get the BJD from the header of the observations in lisobs. |
|
|
|
Get the RON from the header of the observations in lisobs. |
|
Get RV correction from header: BERV and drift. |
|
Get the SNR from the header of the orders ords for the observations in lisobs. |
|
Get number of orders for instrument inst. |
|
Get reference order for instrument inst. |
|
Get the median delta RV per pixel for instrument inst. |
|
Get sampling [pix/SE] for instrument inst. |
|
Read spectrum model. |
|
|
raccoon.telluricutils Module
Telluric utils
Telluric mask file format: - Columns: (0) wavelength [A], (1) “flux”. - Every region (line or set of lines) that should be blocked because it is affected by tellurics is represented by 0110 in the flux column.
Functions
|
Broaden mask by a velocity dv [m/s]. |
|
Same as broaden_mask, but takes as input the wavelength limits of each mask line, instead of the wavelength and flux (0110). |
|
Interpolation function of the telluric mask inverted to be used to mask telluric regions in the data. |
|
Check if there is overlap between 2 consecutive telluric regions. |
|
Join consecutive telluric regions if there is overlap. |
|
Join consecutive telluric regions if there is overlap. |
|
Get wavelength limits of the telluric lines masked. If a line is given by: wa 0 wb 1 wc 1 wd 0 then get wb as the first limit (store it in w1) and wc as the second limit (store it in w2). |
|
|
|
|
|
raccoon.harpsutils Module
Functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Get basic CCF parameters from header of BIS (or CCF) FITS files. |
|
NAXIS1 length of data axis 1 [161 HARPS] CRVAL1 value of ref pixel CTYPE1 Pixel coordinate system [km/s] CDELT1 CCF steps [km/s] |
|
|
|
Try to get the instrument (HARPS or HARPS-N) from the header keywords. |
|
Get the instrument name ('harpn' or 'harps') and the corresponding header keyword start ('HIERARCH TNG ' or 'HIERARCH ESO '). |
|
Read e2ds reduced spectrum flux and wavelength, and optionally the blaze. |
|
|
|
|
|
|
|
Read an e2ds or a blaze reduced spectrum FITS (i.e. spectrum flux). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Get the SNR of the orders in ords (e.g. from keyword 'HIERARCH ESO DRS SPE EXT SN55'). |
|
Get the SNR of the orders in ords (e.g. from keyword ''HIERARCH ESO DRS SPE EXT SN55') for the observations in lisobs. |
|
Get the corresponding start of the header keywords depending on the instrument: - for HARPS, the keywords start with 'HIERARCH ESO...' - for HARPS-N, the keywords start with 'HIERARCH TNG...' If fail, return outfail, which by default is NaN. |
|
Convert pixel to wavelength using the coefficients from the e2ds header, for a single echelle order. |
|
|
|
From e2ds header get the polynomial coefficients necessary to transform from pixels to wavelength. |