** Chaitanya Afle1, Patrick R. Miles1, Silvina Caino-Lores2, Collin D. Capano3,4, Ingo Tews5, Karan Vahi6, Duncan A. Brown1, Ewa Deelman6, Michela Taufer2
1Syracuse University
2University of Tennessee, Knoxville
3Max Planck Institiute for Gravitational Physics
4University of Massachusetts, Darthmouth
5Theoretical Division, Los Alamos National Laboratory
6University of Southern California
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.
NASA's Neutron Star Interior Composition Explorer (NICER) observed X-ray emission from the pulsar PSR J0030+0451 in 2018. Riley \textit{et al.} reported Bayesian parameter measurements of the mass and the radius of the star using pulse-profile modeling of the X-ray data. In this work we reproduce their result using the open-source software \textit{X-PSI} and the publicly available data. We find that we can reproduce the main result within expected statistical error. We note the challenges we faced in reproducing the results. Additionally, to check the robustness of the results, we modify the original analysis in two ways - by changing the prior distribution for the radius, and by changing the sampler configuration. We find that there is no significant change in measurement of the mass and radius because of either modification. We provide a containerized working environment that facilitates reproduction of the measurements of mass and radius of PSR J0030+0451 using the NICER observations.
-
Dockerfile
: Dockerfile to create a Debian-based Docker container with working \textit{X-PSI}v0.1
and PyCBC installation. Please read below for detailed instructions on how to create and use the Docker container usingDockerfile
. -
mpi.cfg
: Configuration file to point thempi4py
installer to the openmpi installation paths. -
sugwg-openmpi-1.10.6.tar.gz
: tarball of the openmpi installation in the compute nodes of thesugwg-condor
cluster. -
requirements.txt
: requirted dependencies for PyCBC v1.18.3 used for plotting (based on Python 2.7). -
openmpiscript
: executable script to be launched via HT Condor while submitting the jobs on thesugwg-condor
cluster. -
sshd.sh
: companian script foropenmpiscript
. -
.singularity.d/env/00-xpsi.sh
: script to activate Conda environment within the Docker container. -
/plotting_scripts
: scripts to plots the posteriors using PyCBC Inference commandpycbc_plot_posteriors
create_hdf_files.py
: creates.hdf
files from the output of the Bayesian sampler that can be read by PyCBC Inference.plot_posteriors.sh
: executingpycbc_plot_posteriors
to generate the plots.
-
Follow the instructions at https://pycbc.org/pycbc/latest/html/docker.html to launch a docker container with a working PyCBC installation:
docker pull pycbc/pycbc-el8:latest
docker run -it pycbc/pycbc-el8:latest
-
Get the Riley et al Zenodo files:
wget https://zenodo.org/record/5506838/files/A_NICER_VIEW_OF_PSR_J0030p0451.tar.gz
tar -xzvf A_NICER_VIEW_OF_PSR_J0030p0451.tar.gz
-
Get the files from Zenodo repository accompanying this article:
wget https://zenodo.org/records/10563924/files/nicer-reproducibility-zenodo.tar.gz
tar -xzvf nicer-reproducibility-zenodo.tar.gz
-
Plot the posteriors:
cd nicer-reproducibility-zenodo/plotting_scripts/
sh plot_posteriors.sh
This should produce two files (for the two models considered in this work):ST_PST.png
andST_EST.png
. To produce a plot without the nlive = 4000 sampler configuration, deleteST_PST_reanalysis_nlive4k.hdf:ST_PST_reanalysis_nlive4k
from line 8 ofplot_posteriors.sh
and rerun it.
Once the files are produced, they can be copied out of the container by using the command (for ST-PST.png
as an example) docker cp <containername>:/opt/pycbc/nicer-reproducibility-zenodo/plotting_scripts/ST_PST.png /host/path/target
. Here, the <containername>
can be obtained by using the command docker ps -a
.
The following instructions are intended to streamline the use of XPSI (https://xpsi-group.github.io/xpsi/index.html) via a Docker container.
-
Clone this repository using
git clone https://github.com/sugwg/nicer.git ~/<nicer_path>
where<nicer_path>
is where you want to clone the repository. -
Change the working directory
cd ~/<nicer_path>
, replacing<nicer_path>
with where you cloned the repository. -
If you want to build the docker container using the
Dockerfile
:- Use the command
id
to check if you are in the docker group onsugwg-condor
. - Use the command
docker build --no-cache --tag chaitanyaafle/nicer:<tag> -f Dockerfile .
to build the container, where one needs to specify a unique tag replacing<tag>
and the container identifierchaitanyaafle/nicer
can be changed to anything in OSG's docker_images.txt here https://github.com/opensciencegrid/cvmfs-singularity-sync/blob/master/docker_images.txt. - Push the new container to Docker Hub using
docker push chaitanyaafle/nicer:<tag>
. After waiting ~a day, this docker image should sync with CVMFS and a singularity container built from the image should become available for use.
- Use the command
-
Once the container is synced, you can use it to submit the analysis jobs. For example, to submit jobs using the build
chaitanyaafle/nicer:8d3b23d
, which is already synced successfully in CVMFS, verify that the correct container identifier and tag are present in the arguments:/cvmfs/singularity.opensciencegrid.org/chaitanyaafle/nicer:8d3b23d
in the submitfilesubmit.sub
. NOTE: The docker imagechaitanyaafle/nicer:8d3b23d
is the latest one that works, and can be used to submitPSR j0030+0451
analysis jobs. -
Output directory and logs
- Make a directory to store the output of the analysis:
mkdir <output_directory>
. - Make a directory to store the logs of the job:
mkdir <log_directory>
.
- Make a directory to store the output of the analysis:
-
Changes to be made in the submitfile
submit.sub
:- On lines 3, 4, 6, 7, 8, and 18 replace
<home_dir>
with the path to your home directory, and<nicer_path>
to where you cloned the repository. - To use an already-synced container, e.g.
chaitanyaafle/nicer:8d3b23d
, verify that the correct container identifier and tag are present in the arguments on line 4:/cvmfs/singularity.opensciencegrid.org/chaitanyaafle/nicer:8d3b23d
. - On line 10, give the appropriate argument for the number of machines to be used, eg.
machine_count = 2
. - On line 11, give the appropriate argument for number of nodes per machine to be used, eg.
request_cpus = 40
. - Replace
<log_directory>
with the correct path on lines 6, 7, and 8.
- On lines 3, 4, 6, 7, 8, and 18 replace
-
Changes to be made in the python script
run_j0030.py
:- Replace
<nicer_path>
to its appropriate value in/srv/<nicer_path>/
... on lines 19, 23, 24, 25, 28, 30, 114, and 154. - In
runtime_params
, the value of the key'outputfiles_basename'
(line 154) should be/srv/<nicer_path>/<output_directory>/run1_nlive1000_eff0.3_noCONST_noMM_noIS_tol-1
, with the appropriate replacements for<nicer_path>
and<output_directory>
.
- Replace
-
Changes to be made in the executable
run_j0030.sh
, assumingnicer/
was cloned to~/<nicer_path>
:- Replace
<nicer_path>
to its appropriate value in/srv/<nicer_path>/run_j0030.py
... on line 8
- Replace
-
Provide the correct path to
sshd.sh
in line 92 inopenmpiscript
, replacing<home_dir>/<nicer_path>
to its correct value. -
Submit the condor job:
condor_submit submit.sub