beast
beast copied to clipboard
plot_noisemodel command line execution doesn't work for multiple noise model files
I tried to plot up noise models for multiple source density bins using the following command in the command line, but it did not work. I had to execute the plot_noisemodel function in the python interpreter instead.
My command in the command line was "beast plot_noisemodel beast_seds.grid.hd5 ['beast_noisemodel_bin1.grid.hd5', 'beast_noisemodel_bin2.grid.hd5'] noisemodel_plot.png
What was the error? Please cut and paste it in a comment. Thanks.
It seems like a list of noisemodel files are not properly digested. Please see the error message below.
- reading SED grid file
- reading [./ugc8508_beast/ugc8508_beast_noisemodel_bin1.grid.hd5,./ugc8508_beast/ugc8508_beast_noisemodel_bin2.grid.hd5,./ugc8508_beast/ugc8508_beast_noisemodel_bin3.grid.hd5,./ugc8508_beast/ugc8508_beast_noisemodel_bin4.grid.hd5]
Traceback (most recent call last):
File "/Users/ychoi/anaconda3/bin/beast", line 33, in
sys.exit(load_entry_point('beast', 'console_scripts', 'beast')()) File "/Users/ychoi/Research/beast/beast/main.py", line 90, in main func(**funcargs) File "/Users/ychoi/Research/beast/beast/plotting/plot_noisemodel.py", line 78, in plot_noisemodel noisemodel_vals = noisemodel.get_noisemodelcat(nfile) File "/Users/ychoi/Research/beast/beast/observationmodel/noisemodel/generic_noisemodel.py", line 131, in get_noisemodelcat nfile = h5py.File(filename, "r") File "/Users/ychoi/anaconda3/lib/python3.7/site-packages/h5py/_hl/files.py", line 408, in init swmr=swmr) File "/Users/ychoi/anaconda3/lib/python3.7/site-packages/h5py/_hl/files.py", line 173, in make_fid fid = h5f.open(name, flags, fapl=fapl) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py/h5f.pyx", line 88, in h5py.h5f.open OSError: Unable to open file (unable to open file: name = '[./ugc8508_beast/ugc8508_beast_noisemodel_bin1.grid.hd5,./ugc8508_beast/ugc8508_beast_noisemodel_bin2.grid.hd5,./ugc8508_beast/ugc8508_beast_noisemodel_bin3.grid.hd5,./ugc8508_beast/ugc8508_beast_noisemodel_bin4.grid.hd5]', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) (base) pinnacle2:UGC8508 ychoi$ ls -tr
Looking at this, I don't see how the command line interface that goes through the beast command
method. It might be possible to do this if you call the plot_noisemodel.py script directly.