jacopo-chevallard / BEAGLE-general

Basic information to get started with the galaxy spectral modelling tool Beagle
https://www.iap.fr/beagle/
9 stars 0 forks source link

"ERROR: Ordinate array contains NULL elements." again, when trying to run fitting on a mock galaxy. #30

Closed kevinhainline closed 7 years ago

kevinhainline commented 8 years ago

I'm trying to run BEAGLE to do some photometric redshift fitting, and I receive the following error, similar to what I got in issue #9 :

% docker run --rm -it -v /Users/knh/Desktop/NIRCam/BEAGLE/BEAGLE-general-master:/BEAGLE_virtual_workdir --env-file env.list beagletool/beagle:0.7.10 --parameter-file /BEAGLE_virtual_workdir/params/BEAGLE_photo_z.param --fit
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
         [ERROR: Ordinate array contains NULL elements. ]
 [FUNCTION: "interpolate" ]
 [MODULE: "lib_interpolation" ]
 [BACKTRACE:   
#0  0x7F0DBDC07E08
#1  0x632BAC in print_backtrace at lib_messages.f90:330
#2  0x66769C in __lib_interpolation_MOD_check_input_grid_values_sp at lib_interpolation.f90:1404
#3  0x672FE3 in __lib_interpolation_MOD_interpolate_array_sp at lib_interpolation.f90:1636
#4  0x63EAA5 in __lib_rebin_MOD_rebin_sp_x at lib_rebin.f90:508
#5  0x40B036 in __handle_templates_MOD_rebin_templates_stellar_region.constprop.0 at handle_templates.f90:387
#6  0x413023 in __handle_templates_MOD_rebin_templates_stellar at handle_templates.f90:336 (discriminator 1)
#7  0x43F49B in __iotemplates_MOD_initialize_templates at iotemplates.f90:167
#8  0x405EB4 in MAIN__ at BEAGLE.f90:282 (discriminator 2)
 ]
 [ ***************************************** ]
 [ ----> EXITING FUNCTION / SUBROUTINE <---- ]             
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 [ ***** STOPPING PROGRAM ***** ]
Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL

There is only one object in my data file, which is in fits format, and looks to be fine. In addition, here is the filter file (and here's the filterfrm.res.zip file):

# It contains the filters to be used when calculating only photometric models

# The possible units that can be used are: Jy, milliJy, microJy, nanoJy
# Alternatively one can pass a conversion factor to convert the fluxes in the
# catalogue into [erg s^-1 cm^-2 Hz^-1] -----> units:value:<conversion factor>
units:microJy

object_ID:colName:ID
#redshift:colName:redshift
#mass:colName:mass

index:124          min_rel_err:0.02       flux:colName:F435W              fluxerr:colName:F435W_err   label:F435W
index:125          min_rel_err:0.02       flux:colName:F606W              fluxerr:colName:F606W_err   label:F606W
index:126          min_rel_err:0.02       flux:colName:F775W              fluxerr:colName:F775W_err   label:F775W
index:186          min_rel_err:0.02       flux:colName:F814W              fluxerr:colName:F814W_err   label:F814W
index:127          min_rel_err:0.02       flux:colName:F850LP             fluxerr:colName:F850LP_err  label:F850LP
index:280          min_rel_err:0.02       flux:colName:F090W              fluxerr:colName:F090W_err   label:F090W
index:281          min_rel_err:0.02       flux:colName:F115W              fluxerr:colName:F115W_err   label:F115W
index:282          min_rel_err:0.02       flux:colName:F150W              fluxerr:colName:F150W_err   label:F150W
index:283          min_rel_err:0.02       flux:colName:F200W              fluxerr:colName:F200W_err   label:F200W
index:284          min_rel_err:0.02       flux:colName:F277W              fluxerr:colName:F277W_err   label:F277W
index:285          min_rel_err:0.02       flux:colName:F356W              fluxerr:colName:F356W_err   label:F356W
index:299          min_rel_err:0.02       flux:colName:fake               fluxerr:colName:fake_err    label:fake
index:295          min_rel_err:0.02       flux:colName:F410M              fluxerr:colName:F410M_err   label:F410M
index:286          min_rel_err:0.02       flux:colName:F444W              fluxerr:colName:F444W_err   label:F444W

and here is my parameter file:

# This is a stripped down version of the BEAGLE parameter file for 
# with checking the correct installation of BEAGLE using Docker.
# This file will be used for producing artificial photometry using
# an analytic star formation history.
# Verbose mode: 0 ---> no info
#               1 ----> print only errors
#               2 ---> print errors and warnings
#               3 ----> print errors, warnings and info 
VERBOSE = 1

# Seed for the random number generator
SEED = 994189

#****************************************************************
#******************** COSMOLOGICAL PARAMETERS *******************
#****************************************************************
#
# If left blank, default parameter values will be used.

HUBBLE_0 = 

OMEGA_MATTER =

OMEGA_LAMBDA =

#****************************************************************
# ******************* TEMPLATES  *****************************
#****************************************************************

#TEMPLATES = $BEAGLE_TEMPLATES/bc03/bc03_miles_chab_spectra
TEMPLATES NEBULAR = $BEAGLE_TEMPLATES/ineb_Jan16_C100/cb2013_n2_mup100_N015_O01_deplO70_C100_Jan16
EMISSION LINES CONFIGURATION = $BEAGLE_TEMPLATES/ineb_Jan16_C100/cb2013_n2_mup100_N015_O01_deplO70_C100_Jan16_line_wavelengths_PHOTOMETRY.dat

SHRINK TEMPLATES WL RANGE = 900 60000
REBIN TEMPLATES = 10

#****************************************************************
# ******************* PHOTOMETRY *****************************
#****************************************************************

FILTERS FILE = $BEAGLE_FILTERS/filters_HST_NIRCAM.dat

PHOTOMETRIC CATALOGUE = $BEAGLE_DATA/BEAGLE_photz_1.fits

FIT PHOTOMETRY = T
FIT SPECTRUM = F

#****************************************************************
#******************** DUST ATTENUATION AND IGM ABSORPTION *******
#****************************************************************
#
IGM ABSORPTION = Inoue

# **************************************************
# ************** SF BIN #1 **************************
# **************************************************
SF_PARAMETER  = name:sfh_type                 type:fixed  char_value:delayed
#options for analytic SFHs are 'ssp' (for a burst), 'constant', 'exponential', 'delayed', 'rising'

# In log(yr)
SF_PARAMETER  = name:tau                      type:fitted  order_priority:1  prior:distribution:uniform  prior:range:[7.,10.5]

# in log(Z/Z_sun)
SF_PARAMETER  = name:metallicity              type:fitted  order_priority:1  prior:distribution:uniform  prior:range:[-2.2,0.24]

# In log M/M_sun
SF_PARAMETER  = name:mass                     type:fitted  order_priority:0  prior:distribution:uniform  prior:range:[5.,12.] 

# **************************************************
# **************  OTHER SF PARAMETERS **************************
# **************************************************

# In log(M_sun/yr)
SF_PARAMETER  = name:sfr                type:fitted  order_priority:1  prior:distribution:uniform  prior:range:[-4.,4.]

#****************************************************************
# ******************* PRINTED OUTPUT  *****************************
#****************************************************************

RESULTS DIRECTORY = $BEAGLE_RESULTS/BEAGLE_photz_1/

PRIORS CATALOGUE = $BEAGLE_DATA/BEAGLE_photz_1.fits

PRINT PHOTOMETRY = T
PRINT SPECTRUM = T
PRINT SPECTRAL INDICES = F
PRINT SF AND ChE HISTORIES = F

#****************************************************************
# ******************* PARAMETERS HANDLING  *****************************
#****************************************************************

PDF SAMPLER FILE = $BEAGLE_PARAM_DIR/MCMC_new.param

PARAMETER  = name:redshift     type:fitted    prior:distribution:uniform    prior:range:[0.,15.]

PARAMETER  = name:nebular_logU type:dependent

PARAMETER  = name:nebular_xi   type:fixed    value:0.3

PARAMETER  = name:nebular_Z    type:dependent 

PARAMETER  = name:attenuation_type  type:fixed  char_value:CF00   
# values can be: CF00, Calzetti, CCWW13_universal, CCWW13_full

PARAMETER  = name:tauV_eff     type:fitted  order_priority:0      prior:distribution:uniform   prior:range:[0.,2.]

PARAMETER  = name:mu           type:fixed   value:0.4
kevinhainline commented 8 years ago

I went back and ran this using an older version:

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_photo_z.param

And the program ran fine. I'm currently analyzing the results.

jacopo-chevallard commented 8 years ago

Can you check if in you $BEAGLE_TEMPLATES/ineb_Jan16_C100 folder you have some *ised files as well? i.e., run ls -l $BEAGLE_TEMPLATES/ineb_Jan16_C100/*ised

kevinhainline commented 8 years ago

It doesn't look like it:

% ls -l $BEAGLE_TEMPLATES/ineb_Jan16_C100/*ised
ls: No match.
jacopo-chevallard commented 8 years ago

good, then this is a candidate for the origin of the problem...if you re-download the SSPs from the (anonymous) ftp.iap.fr/pub/from_users/chevalla/SSPs, then you should get the *ised in the ineb_Jan16_C100 folder.

Retry to run with the updated folder and let me know!

jacopo-chevallard commented 7 years ago

any news here?

kevinhainline commented 7 years ago

I just reran BEAGLE with the updated templates folder, and it ran fine! The results were a little different from when I ran things with 0.3.3, but I assume that this is as a result of the updated way that BEAGLE deals with emission lines. Thank you!

jacopo-chevallard commented 7 years ago

Yes indeed, it shouldn't be a very big difference for broad-band fluxes, but it certainly has an effect! closing this then!