Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fluxcal ee #153

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Fluxcal ee #153

wants to merge 6 commits into from

Conversation

EvgeniiaEgorova
Copy link

I added the model_selection function, to find the best-fit model spectra and get the conversion from model units to the Gaia flux units. For model selection, I use the AMBRE library from the Pollux database, with temperatures 6000-7750. I have two subfolders with the models:

  • «convolved»: I put here models already convolved with LSF=1.5A (as the first approximation, this can be improved by using the median LSF in each channel) and normalized (so the total sum should be 1). These files are used to find the best-fit model.
  • «good_res»: models with a good resolution that are used to calculate the sensitivity curve. The archive with all spectra with the initial resolution is ~50Gb, so I degraded spectra a bit: convolved with LSF=0.3A and resampled to step=0.05A.
    In this function, we also check for the possible velocity offsets in each branch, which can be used later to correct them.

In the fluxcal_standard_stars and standard_sentitivity functions, I added new inputs: model_list (with the list of best-fit model names) and model_coef (with coefficients to convert the model units to the Gaia units), and the keyword «mode», which can be set as «GAIA» or «model» to choose the version for sensitivity curves calculation. The model_list and model_coef are the outputs from the model_selection function.

If we choose the «model» option (default behaviour in this version), then the standard_sentitivity function will call the calc_sensitivity_from_model function (instead of simply calculating sens = stdflux / spec).

calc_sensitivity_from_model function needs the wavelength array, observed standard spectra fluxes, spectrograph lsf, name of best-fit models, and conversion coefficient (from model to Gaia units). This function reads the best-fit model spectra with good resolution, convolves it with spectrograph LSF, and calculates the sensitivity curve as: sens = model_convolved_spec_lsf * model_to_gaia_median / obs_spec, where model_convolved_spec_lsf - model convolved with spectrograph LSF, model_to_gaia_median- conversion from model to Gaia units, obs_spec - observed standard spectra.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants