Commit 07dd3fda authored by Médéric Boquien's avatar Médéric Boquien

Merge branch 'develop' into starburst99

parents b5947c79 cd73ba2b
Pipeline #3510 skipped with stage

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -6,3 +6,5 @@ pcigale/data/data.db
pcigale.egg-info
docs/_build
docs/api
dist/
build/
stages:
- build
build_wheel:
stage: build
image: python:latest
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
script:
- python setup.py sdist bdist_wheel
- pip install twine
- twine upload --verbose --disable-progress-bar --repository-url $TWINE_URL -u $TWINE_USER -p $TWINE_PASS dist/pcigale*.whl
when: manual
pcigale authors list
====================
This document lists alphabetically the various authors who wrote the pcigale
code with their current email address and affiliation.
This document lists alphabetically the core team who wrote the pcigale code
with their current email address and affiliation.
* Médéric Boquien <mederic.boquien@uantof.cl>,
Universidad de Antofagasta, Chile
......@@ -10,4 +10,9 @@ code with their current email address and affiliation.
Laboratoire d'Astrophysique de Marseille, France
* Laure Ciesla <ciesla@lam.fr>,
Laboratoire d'Astrophysique de Marseille, France
* Yannick Roehlly <yannick@iaora.eu>
* David Corre <david.corre@lam.fr>
Laboratoire d'Astrophysique de Marseille, France
* Yannick Roehlly <yannick.roehlly@lam.fr>
Laboratoire d'Astrophysique de Marseille, France
* Héctor Salas Olave <hector.salas.o@gmail.com>
Universidad de Antofagasta, Chile
This diff is collapsed.
......@@ -22,7 +22,7 @@ import scipy.constants as cst
from astropy.table import Table
from pcigale.data import (Database, Filter, M2005, BC03, SB99, Fritz2006,
Dale2014, DL2007, DL2014, NebularLines,
NebularContinuum, Schreiber2016, THEMIS)
NebularContinuum, SKIRTOR2016, Schreiber2016, THEMIS)
def read_bc03_ssp(filename):
......@@ -140,11 +140,16 @@ def read_bc03_ssp(filename):
def build_filters(base):
filters = []
filters_dir = os.path.join(os.path.dirname(__file__), 'filters/')
for filter_file in glob.glob(filters_dir + '*.dat'):
for filter_file in glob.glob(filters_dir + '**/*.dat', recursive=True):
with open(filter_file, 'r') as filter_file_read:
filter_name = filter_file_read.readline().strip('# \n\t')
filter_type = filter_file_read.readline().strip('# \n\t')
filter_description = filter_file_read.readline().strip('# \n\t')
# Make the name dynamic for filters in subdirectories
tmp_name = filter_file.replace(filters_dir, '')[:-4]
if '/' in tmp_name:
filter_name = tmp_name.replace('/', '.')
filter_table = np.genfromtxt(filter_file)
# The table is transposed to have table[0] containing the wavelength
# and table[1] containing the transmission.
......@@ -168,7 +173,8 @@ def build_filters(base):
# We normalise the filter and compute the pivot wavelength. If the
# filter is a pseudo-filter used to compute line fluxes, it should not
# be normalised.
if not filter_name.startswith('PSEUDO'):
if not (filter_name.startswith('PSEUDO') or
filter_name.startswith('linefilter')):
new_filter.normalise()
else:
new_filter.pivot_wavelength = np.mean(
......@@ -775,6 +781,55 @@ def build_fritz2006(base):
base.add_fritz2006(models)
def build_skirtor2016(base):
models = []
skirtor2016_dir = os.path.join(os.path.dirname(__file__), 'skirtor2016/')
files = glob.glob(skirtor2016_dir + '/*')
files = [file.split('/')[-1] for file in files]
params = [f.split('_')[:-1] for f in files]
# Parameters of SKIRTOR 2016
t = list({param[0][1:] for param in params})
p = list({param[1][1:] for param in params})
q = list({param[2][1:] for param in params})
oa = list({param[3][2:] for param in params})
R = list({param[4][1:] for param in params})
Mcl = list({param[5][3:] for param in params})
i = list({param[6][1:] for param in params})
iter_params = ((p1, p2, p3, p4, p5, p6, p7)
for p1 in t
for p2 in p
for p3 in q
for p4 in oa
for p5 in R
for p6 in Mcl
for p7 in i)
for params in iter_params:
filename = skirtor2016_dir + \
"t{}_p{}_q{}_oa{}_R{}_Mcl{}_i{}_sed.dat".format(*params)
print("Importing {}...".format(filename))
wl, disk, scatt, dust = np.genfromtxt(filename, unpack=True,
usecols=(0, 2, 3, 4))
wl *= 1e3
disk += scatt