Closed dr-guangtou closed 8 years ago
That should work. Note that FSPS doesn't actually use the FILTER_LIST
, magsun.dat
, and filter_lambda_eff.dat
files, but I think python-FSPS does at some level.
We are working on a way to do this more easily, which should be ready soon. When it is ready you'll just have to replace FILTER_LIST
and allfilters.dat
(or give another file name as the "alt_filter_file"
variable in fsps/src/sps_vars.f90
).
Hi Ben,
Thanks for the reply. That would be great! I'll close the issue for now.
Hi,
I have added Gaia DR2 and EDR3 filters by updating the below mentioned files as: 1) $FSPS_DIR/data/filter_lambda_eff.dat 144 5048.62 145 6246.77 146 7740.87 147 5109.71 148 6217.59 149 7769.02 2) $FSPS_DIR/data/FILTER_LIST 144 Gaia2r_Gbp Gaia-DR2 Bp 145 Gaia2r_G Gaia-DR2 G 146 Gaia2r_Grp Gaia-DR2 Rp 147 Gaia3_Gbp Gaia-DR3 Bp 148 Gaia3_G Gaia-DR3 G 149 Gaia3_Grp Gaia-DR3 Rp 3) I do not know what to change in the $FSPS_DIR/data/magsun.dat file so I kept it as it is. 4) Modified the nbands parameter in the $FSPS_DIR/src/sps_vars.f90 routine from 143 to 149.
I then uninstalled fsps and reinstalled it by this command: "FFLAGS="-DBASTI=1 -DMIST=0 -DPADOVA=0 -DMILES=1 -DBASEL=0" python -m pip install fsps==0.4.0rc1 --no-binary fsps"
I successfully imported Gaia filters, but when I was trying to get isochrone files using the code:
sps = fsps.StellarPopulation(zcontinuous=1) sps.params['imf_type'] = 0 # Salpeter IMF sps.params['sfh'] = 1 # Tau model SFH iso = sp.isochrones()
Then getting IndexError as: IndexError Traceback (most recent call last)
Hi
I am currently working on images from Hyper-Suprime Camera survey, and it would be great if the HSC filters can be added to FSPS. I have the un-normalized transimission curve of these filters, and just want to make sure that my assumption about how to do this is correct.
$FSPS_DIR/data/allfilters.dat
like this:HSC-g filter
$FSPS_DIR/data/filter_lambda_eff.dat
$FSPS_DIR/data/FILTER_LIST
Add the absolute magnitude of sun in the newly added filter to
$FSPS_DIR/data/magsun.dat
(Related to this, can I calculated this value using the solar SED in
$FSPS_DIR/SPECTRA/SUN_STScI.SED
?)$FSPS_DIR/src/sps_vars.f90
routinehttps://github.com/dfm/python-fsps/blob/master/fsps/data/filter_keys.txt
Please let me know if I missed anything. And, do you think it is worth adding a function to make this step easier? Thanks!