Closed cdcapano closed 5 years ago
Hello @cdcapano! Thanks for updating the PR.
There are no PEP8 issues in the file gwin/io/__init__.py
!
Complete extra results for this file :
file_to_check.py:419:-92: W605 invalid escape sequence '*'
There are no PEP8 issues in the file gwin/io/base_hdf.py
!
Complete extra results for this file :
file_to_check.py:107:-81: W605 invalid escape sequence '*' file_to_check.py:178:-188: W605 invalid escape sequence '*' file_to_check.py:212:-90: W605 invalid escape sequence '*' file_to_check.py:252:-492: W605 invalid escape sequence '*' file_to_check.py:280:-457: W605 invalid escape sequence '*' file_to_check.py:312:-244: W605 invalid escape sequence '*' file_to_check.py:771:-48: W605 invalid escape sequence '*'
There are no PEP8 issues in the file gwin/io/base_mcmc.py
!
Complete extra results for this file :
file_to_check.py:176:-336: W605 invalid escape sequence '*'
There are no PEP8 issues in the file gwin/models/base.py
!
Complete extra results for this file :
file_to_check.py:491:-177: W605 invalid escape sequence '*' file_to_check.py:531:-228: W605 invalid escape sequence '*' file_to_check.py:614:-186: W605 invalid escape sequence '*' file_to_check.py:734:-159: W605 invalid escape sequence '*'
There are no PEP8 issues in the file gwin/option_utils.py
!
There are no PEP8 issues in the file gwin/results/scatter_histograms.py
!
Tests:
gwin_plot_posterior
on a GW150914 run (only after a few iterations): plot
gwin_plot_movie
on a run on a 2D TestNormal
model: movie
This PR also allows you to plot any parameter or likelihood statistic on any of the corner plots, or in the color bar using the parameters option, as these are now all stored in the samples
group. For example:
gwin_plot_posterior \
--verbose \
--iteration -1 \
--input-file gwin.hdf.checkpoint \
--output-file scatter_with_stats.png \
--plot-scatter --plot-marginal \
--z-arg 'mchirp_from_mass1_mass2(mass1, mass2):mchirp' \
--parameters \
tc \
'snr_from_loglr(abs(H1_cplx_loglr)):$\rho_H$' \
'snr_from_loglr(abs(L1_cplx_loglr)):$\rho_L$' \
'snr_from_loglr(abs(loglr)):$\rho$'
Yields: scatter_with_stats.png
The travis tests fail because I haven't updated the unit tests yet. I'll do that in another PR, when the project is ready to be merged to master.
Need this now, so just merging... if there are issues, can always fix on the project branch.
Updates
read_samples_from_cli
,gwin_plot_posterior
andgwin_plot_movie
(other plotting codes will be addressed in another PR) to handle new sampler files. Also provides a way to print off a more informative help, based on the given input files.Sampler-specific options are now added by to the argument parser by the sampler's IO class. Specifically,
--iteration
,--thin-start
,--thin-interval
,--thin-end
,--walkers
are added by theBaseMCMCIO
class, since these are all options unique to MCMC (and presumably would not be understood by a nested sampler file). Likewise, once support is added foremcee_pt
(separate PR), it will add a--temps
argument.These sampler-specific options do not appear when you run the program's
--help/-h
, but can be viewed by providing an input file and running--file-help/-H
. For example, running-h
on :The thin options are not visible. Running
-H
with a samples file that was produced byemcee
gives:The options are shown, along with the parameters that may be plotted and functions that may be used.
This also allows for one or more of these options to be turned off. For example,
gwin_plot_movie
does not accept thethin-
and iterations arguments, since these are figured out internally. These options are therefore turned off:If no
--input-file
is given when--file-help/-H
is run, then an error is raised.