hippke / spec2col

A code to convert spectra to colors. Our paper can be found at https://arxiv.org/abs/2101.06254. If you decide to use our code, please cite our paper. Some pre-computed colors from stellar and black body spectra can be found at https://zenodo.org/record/4090873.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In order to use spec2col.py you need:
-cmf_precise.txt
-a "spectra" folder containing your chosen PHOENIX spectra (see line 12 in this file) in a ".fits" format or 
 different spectra in the ".csv" or ".txt" format as a table with (column 1: wavelength, column 2: flux)
	For your own spectra in a ".csv" or ".txt" format:
	- the wavelength resolution should be better than 1AA
	- if the wavelength range in your spectrum is only partly in the range of 3900AA to 8300AA, it needs to be manually extended so that the whole range is covered. Steps of 1AA are accurate enough.
	- if the data is only available as ".txt" files: the standard delimiter is set as ",". It can be changed in line 188 in "spec2col.py".
	  

- PHOENIX spectra are recommended, which can be found under:
	"http://phoenix.astro.physik.uni-goettingen.de/data/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/"
  You will also need a wavelength file, which can be found for the PHOENIX spectra under:
	"http://phoenix.astro.physik.uni-goettingen.de/data/HiResFITS" with the name "WAVE_PHOENIX-ACES-AGSS-COND-2011.fits".
  This file needs to be placed in the same directory as "spec2col.py".


The resulting color(s) will be put into the file "color_result.txt".

The data in cmf_precise.txt are taken from http://cvrl.ioo.ucl.ac.uk/. Copyright by Color and Vision Research Labs.

About

A code to convert spectra to colors. Our paper can be found at https://arxiv.org/abs/2101.06254. If you decide to use our code, please cite our paper. Some pre-computed colors from stellar and black body spectra can be found at https://zenodo.org/record/4090873.

License:MIT License


Languages

Language:Python 100.0%