This is a python3 implementation of a parallax of pulsation method for Cepheids stars, described in Mérand et al. (Astronomy & Astrophysics 584-80, 2015). It replaces the now outdated 2.7 version. As of November 2022, 17 refereed articles have been published with SPIPS.
The code fits photometric measurement (including colors), radial velocities and interferometric angular diameters in a consistent way to derive the effective temperature, as well as apparent and absolute radial temporal variations of pulsating stars. From these later 2 quantities, absolute distances can be derived.
An example below of several galactic Cepheids in the radius/effective temperature diagram, based on the sample of Trahin et al. (2021). Dots are average values, and the light lines are the actual variations during the pulsation. This sample was used to generate templates to fit extragalactic Cepheids' light curves in Javanmardi et al. (2021).
Quick Start:
- download all files
- in python3:
import delta_cep
- this will load spips.py
- first time you load spips.py, lots of models will be downloaded: ATLAS9 models and SATLAS models.
- run
delta_cep.show(delta_cep.p_fourier)
to show the model with Fourier parameters - run
delta_cep.show(delta_cep.p_splines)
to show the model with Splines parameters - run
delta_cep.fit(delta_cep.p_splines)
to run a fit. Check the inside of the function to see how it works.
The result of the model is shown below:
- the upper left panel (a) shows the phased radial velocity data (points) and model (line)
- the middle left panel (b) shows the phased effective temperature data (points) and mode l (line)
- the lower left panel (c) shows the phased interferometric angular diameter data (points) and model (lines). Note that the different colors show the impact of the effects of the interferometric baseline on the diameter measurements, due to the presence of an circum-stellar envelop
- the panels on the right hand side (d to v) show the photometric data.
delta_cep.fitsDemo(mode='export')
will export the model and the data to a FITS file (delta_cep.fits
), which can be read using delta_cep.fitsDemo(mode='import')
. Note that delta_cep.fitsDemo(mode='import')
recomputes the model, rather than plotting the one in the FITS files. One can easily write their own routines to read and display the FITS file created by SPIPS, as they are self-explanatory.
numpy
,scipy
,matplotlib
andastropy.io.fits
Copyright (c) 2017-2022, Antoine Mérand All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.