Closed kevinhainline closed 8 years ago
I managed to get the example to run cleanly with eclake/beagle:0.3.3
I get the same error with eclake/beagle:0.3.3:
[KNHDesktop:~/Desktop/NIRCam/BEAGLE] knh% docker run --rm -it -v /Users/knh/Desktop/NIRCam/BEAGLE/BEAGLE-general-master:/BEAGLE_virtual_workdir --env-file env.list eclake/beagle:0.3.3 1 /BEAGLE_virtual_workdir/params/BEAGLE_mock_test_1.param
Reading Filter File: /BEAGLE_virtual_workdir/filters/FILTERBIN.RES
298 filters defined, out of 300 maximum ...done
---> fixed sfh_type 0
---> from_file mass 0
---> from_file redshift 0
---> dependent nebular_logU 0
---> fixed nebular_xi 0
---> dependent nebular_Z 0
---> fixed attenuation_type 0
---> fitted tauV_eff 0
---> fixed mu 0
---> fitted tau 1
---> fitted metallicity 1
n_fitted: 3
*****************************************************
MultiNest v3.9
Copyright Farhan Feroz & Mike Hobson
Release Oct 2014
no. of live points = 300
dimensionality = 3
*****************************************************
Starting MultiNest
generating live points
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[ERROR: "locate" failed, the condition x(i) <= x < x(i+1) is not satisfied! ]
[FUNCTION: "locate_sp" ]
[MODULE: "lib_interpolation" ]
[BACKTRACE:
#0 0x7FE9ED84C777
#1 0x5362C4 in print_backtrace at lib_messages.f90:299
#2 0x52047C in __lib_interpolation_MOD_locate_sp at lib_interpolation.f90:1199 (discriminator 1)
#3 0x52117B in __lib_interpolation_MOD_get_linear_weights_sp at lib_interpolation.f90:2868
#4 0x526822 in __lib_interpolation_MOD_linear_interpolate_grid_2d_sp at lib_interpolation.f90:2185 (discriminator 1)
#5 0x43A4BF in __sps_routines_MOD_get_sps_spectra_age_z at SPS_routines.f90:157 (discriminator 2)
#6 0x46AF81 in __galaxy_sed_MOD_compute_sed at galaxy_SED.f90:216
#7 0x47A3BE in __likelihood_function_MOD_likelihood at likelihood_function.f90:150
#8 0x47DCD3 in __likelihood_function_MOD_mc_likelihood at likelihood_function.f90:89 (discriminator 3)
#9 0x57D559 in getloglike at nested_sampling.f90:193 (discriminator 2)
#10 0x5A2606 in __nested_MOD_gen_initial_live at nested.F90:536
#11 0x5A33F0 in __nested_MOD_nestsample at nested.F90:352
#12 0x5A468C in __nested_MOD_nestrun at nested.F90:239
#13 0x57D78D in __nested_sampling_MOD_run_nested_sampling at nested_sampling.f90:133
#14 0x572CDA in __prosit_MOD_sample_pdf at PROSIT.f90:235 (discriminator 1)
#15 0x415659 in beagle at BEAGLE.f90:436 (discriminator 2)
]
[ ***************************************** ]
[ ----> EXITING FUNCTION / SUBROUTINE <---- ]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[ +++++ ERROR DETECTED: Do you want to continue with the execution of the program? (y/n)]
This is strange... This
#5 0x43A49F in __sps_routines_MOD_get_sps_spectra_age_z at SPS_routines.f90:157 (discriminator 2) #6 0x46A375 in __galaxy_sed_MOD_compute_sed at galaxy_SED.f90:215
tells us that problem arises when interpolating the input SSPs (which are given at discrete points in an age-metallicity grid) onto the pairs (age, metallicity) describing the model SFH.
Kevin, can you make a couple tests: change the parameter mass
from from_file
to fitted
, i.e. uncommenting the line before the one where you define
SF_PARAMETER = name:mass type:from_file
and commenting out the line above.
Re-run BEAGLE, and tell me if anything has changed.
Repeat the same test by changing
SF_PARAMETER = name:sfh_type type:fixed char_value:rising
into
SF_PARAMETER = name:sfh_type type:fixed char_value:delayed
Then, does the example Emma provided run smoothly?
I don't think I'll be able to do more tests today, but I can try to reproduce your error tomorrow. Can you attach in a zip all files you're using to run your fitting? (param, filters, etc...)
Sorry Kevin, I haven't managed to reproduce the error locally, and have made sure that the docker image I'm using is the same as the version on dockerhub.
We might need an independent tester with the files that you've provided here.
Here is the link to the working directory I'm using I don't suggest copying all of it as it includes the template directory, but perhaps you could take a look at the files you expect me to be using and check them against the ones you're using?
The code ran when I used this line:
SF_PARAMETER = name:mass type:fitted order_priority:0 prior:distribution:uniform prior:range:[5.,12.]
instead of
SF_PARAMETER = name:mass type:from_file
Should the mass have been in lg(mass) units? The input file has them in terms of solar masses.
If I go back to the original parameter file, and only change the star formation history:
from:
SF_PARAMETER = name:sfh_type type:fixed char_value:rising
to:
SF_PARAMETER = name:sfh_type type:fixed char_value:delayed
I once again get the previous error:
[KNHDesktop:~/Desktop/NIRCam/BEAGLE] knh% docker run --rm -it -v /Users/knh/Desktop/NIRCam/BEAGLE/BEAGLE-general-master:/BEAGLE_virtual_workdir --env-file env.list eclake/beagle:0.3.3 1 /BEAGLE_virtual_workdir/params/BEAGLE_mock_test_2.param
Reading Filter File: /BEAGLE_virtual_workdir/filters/FILTERBIN.RES
298 filters defined, out of 300 maximum ...done
---> fixed sfh_type 0
---> from_file mass 0
---> from_file redshift 0
---> dependent nebular_logU 0
---> fixed nebular_xi 0
---> dependent nebular_Z 0
---> fixed attenuation_type 0
---> fitted tauV_eff 0
---> fixed mu 0
---> fitted tau 1
---> fitted metallicity 1
n_fitted: 3
*****************************************************
MultiNest v3.9
Copyright Farhan Feroz & Mike Hobson
Release Oct 2014
no. of live points = 300
dimensionality = 3
*****************************************************
Starting MultiNest
generating live points
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[ERROR: "locate" failed, the condition x(i) <= x < x(i+1) is not satisfied! ]
[FUNCTION: "locate_sp" ]
[MODULE: "lib_interpolation" ]
[BACKTRACE:
#0 0x7F2A82F6F777
#1 0x5362C4 in print_backtrace at lib_messages.f90:299
#2 0x52047C in __lib_interpolation_MOD_locate_sp at lib_interpolation.f90:1199 (discriminator 1)
#3 0x52117B in __lib_interpolation_MOD_get_linear_weights_sp at lib_interpolation.f90:2868
#4 0x526822 in __lib_interpolation_MOD_linear_interpolate_grid_2d_sp at lib_interpolation.f90:2185 (discriminator 1)
#5 0x43A4BF in __sps_routines_MOD_get_sps_spectra_age_z at SPS_routines.f90:157 (discriminator 2)
#6 0x46AF81 in __galaxy_sed_MOD_compute_sed at galaxy_SED.f90:216
#7 0x47A3BE in __likelihood_function_MOD_likelihood at likelihood_function.f90:150
#8 0x47DCD3 in __likelihood_function_MOD_mc_likelihood at likelihood_function.f90:89 (discriminator 3)
#9 0x57D559 in getloglike at nested_sampling.f90:193 (discriminator 2)
#10 0x5A2606 in __nested_MOD_gen_initial_live at nested.F90:536
#11 0x5A33F0 in __nested_MOD_nestsample at nested.F90:352
#12 0x5A468C in __nested_MOD_nestrun at nested.F90:239
#13 0x57D78D in __nested_sampling_MOD_run_nested_sampling at nested_sampling.f90:133
#14 0x572CDA in __prosit_MOD_sample_pdf at PROSIT.f90:235 (discriminator 1)
#15 0x415659 in beagle at BEAGLE.f90:436 (discriminator 2)
]
[ ***************************************** ]
[ ----> EXITING FUNCTION / SUBROUTINE <---- ]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[ +++++ ERROR DETECTED: Do you want to continue with the execution of the program? (y/n)]
I don't know which example Emma provided that you are referring to, so I can't run that. I'll package everything up as a zip file and attach it in a minute or two.
Yes, the mass
must be in units of log10 !
Ok, let me re-run things with log(mass) units.
It's running! And it took about 3 minutes to run things on this one object. It looks like this might have been the issue?
yes indeed! all units must be of the same type as defined in the parameter file!
One more quick question - how is the "UV slope" as defined by BEAGLE calculated? I know this is the wrong place to ask this, but I just remembered I meant to ask in the telecon. I want to double-check that the resulting fits have UV slopes that make agree with our input slope.
The UV slope ic computed by considering the fluxes in the GALEX FUV and NUV bands, then fitting a straight line to the log of the fluxes.
Closing the issue now, assuming that the fitting is working properly.
After explicitly specifying the location of the MOCK INPUT PARAMETERS file in the parameters file, and running (emma's test version of) BEAGLE, I get this error:
So, this looks like a Multinest issue. I've included the input photometry file here:
BEAGLE_mock.fits.zip
And the new MCMC file, as well as the parameter file, are located below:
MCMC_new.param:
And BEAGLE_mock_test_1.param: