Commit d56a2a90 authored by Médéric Boquien's avatar Médéric Boquien

As the BPASS models are very heavy, it can be an advantage not to have them...

As the BPASS models are very heavy, it can be an advantage not to have them all. So we simply skip the ones that are not present in the directory even though in principle they should.
parent 13c627cf
Pipeline #2998 skipped with stage
......@@ -16,6 +16,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
import glob
import io
import itertools
from pathlib import Path
import numpy as np
from scipy import interpolate
import scipy.constants as cst
......@@ -470,6 +471,11 @@ def build_bpassv2(base, bpassres):
massname = basename.format(bpass_dir, 'starmass', binary, key_imf,
key_metal)
# As BPASS models are very large, it is unlikely that they are all
# available, so we skips the models that are not present
if not Path(specname).is_file():
continue
print("Importing {}...".format(specname))
spec = np.genfromtxt(specname)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment