Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyGRB postprocessing: segment writing/loading #4542

Merged
merged 11 commits into from
Dec 7, 2023

Conversation

jakeb245
Copy link
Contributor

This PR is another step in completing #4419. The load_segment_dict function returns the segments analyzed in the PyGRB analysis. The original code set up analysis segments differently for long time slides. Those have not been implemented (yet?) so here it is simpler. I had to add some writing of segments to pycbc_multi_inspiral to get this to work.

@jakeb245 jakeb245 self-assigned this Oct 24, 2023
@jakeb245 jakeb245 added the PyGRB PyGRB development label Oct 24, 2023
pycbc/events/eventmgr.py Outdated Show resolved Hide resolved
seg_list.append(segments.segment(seg_starts[i], seg_ends[i]))

# Write segment_dict in proper format
# At the moment of this comment, there is only one segment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try it with more than one segment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The segments in this context refer to the segments analyzed in pycbc_multi_inspiral. In the coh_ptf code the segments were defined in a more complicated way based on long time slides. We don't have that functionality for pycbc_multi_inspiral at this point, so the result of this function is a dictionary of one slide with the full analysis chunk (since it coalesces the smaller segments into one). Having multiple segments would imply a gap in the data in the current state of the code.

I suppose the functions here are mostly redundant if we're not doing long slides. This function is where the original code set up this structure. The output gets written into the XML file which the load_segment_dict function here was meant to read. I attempted to emulate this to achieve the same result.

pycbc/results/pygrb_postprocessing_utils.py Outdated Show resolved Hide resolved
jakeb245 and others added 4 commits November 8, 2023 08:58
Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>
@pannarale pannarale merged commit d340bc6 into gwastro:master Dec 7, 2023
33 checks passed
maxtrevor pushed a commit to maxtrevor/pycbc that referenced this pull request Dec 11, 2023
* Try fixing load_segment_dict

* Use segments/GPS time API more correctly

* Use h5py correctly

* Codeclimate

* Add comment

* condense segment list creation

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>

* Plural start/end time in file output

* Codeclimate

---------

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>
bhooshan-gadre pushed a commit to bhooshan-gadre/pycbc that referenced this pull request Dec 19, 2023
* Try fixing load_segment_dict

* Use segments/GPS time API more correctly

* Use h5py correctly

* Codeclimate

* Add comment

* condense segment list creation

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>

* Plural start/end time in file output

* Codeclimate

---------

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>
GarethCabournDavies pushed a commit to GarethCabournDavies/pycbc that referenced this pull request Dec 19, 2023
* Try fixing load_segment_dict

* Use segments/GPS time API more correctly

* Use h5py correctly

* Codeclimate

* Add comment

* condense segment list creation

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>

* Plural start/end time in file output

* Codeclimate

---------

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>
maxtrevor pushed a commit to maxtrevor/pycbc that referenced this pull request Jan 16, 2024
* Try fixing load_segment_dict

* Use segments/GPS time API more correctly

* Use h5py correctly

* Codeclimate

* Add comment

* condense segment list creation

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>

* Plural start/end time in file output

* Codeclimate

---------

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>
bhooshan-gadre pushed a commit to bhooshan-gadre/pycbc that referenced this pull request Mar 4, 2024
* Try fixing load_segment_dict

* Use segments/GPS time API more correctly

* Use h5py correctly

* Codeclimate

* Add comment

* condense segment list creation

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>

* Plural start/end time in file output

* Codeclimate

---------

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>
lpathak97 pushed a commit to lpathak97/pycbc that referenced this pull request Mar 13, 2024
* Try fixing load_segment_dict

* Use segments/GPS time API more correctly

* Use h5py correctly

* Codeclimate

* Add comment

* condense segment list creation

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>

* Plural start/end time in file output

* Codeclimate

---------

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>
acorreia61201 pushed a commit to acorreia61201/pycbc that referenced this pull request Apr 4, 2024
* Try fixing load_segment_dict

* Use segments/GPS time API more correctly

* Use h5py correctly

* Codeclimate

* Add comment

* condense segment list creation

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>

* Plural start/end time in file output

* Codeclimate

---------

Co-authored-by: Francesco Pannarale <pannarale@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PyGRB PyGRB development
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants