-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add jackknife errors to angular correlation function; add some cosmet… #180
Conversation
Here is the descqa test: 2pt correlation fucntion |
@yymao Code passed checks and is ready for review |
The change here is substantial that I am not comfortable doing a quick review. I wonder if @patricialarsen can help review this one? |
@yymao @patricialarsen The code was pulled from the number-density test (so the code is essentially already reviewed) and was run with both cosmoDC2_v1.1.4_image and cosmoDC2_v1.1.4_small to check that the errors looked sensible. This code was also used for the figure in the cosmoDC2 paper. We vetted it at the time, so I expect that the review will be straightforward. |
descqa/CorrelationsTwoPoint.py
Outdated
@@ -492,7 +498,8 @@ def run_on_single_catalog(self, catalog_instance, catalog_name, output_dir): | |||
catalog_data, sample_conditions) | |||
|
|||
with open(os.path.join(output_dir, 'galaxy_count.dat'), 'a') as f: | |||
f.write('{} {}\n'.format(sample_name, len(tmp_catalog_data['ra']))) | |||
f.write('{} {} {:.1f} sq. deg.\n'.format(sample_name, len(tmp_catalog_data['ra']), | |||
self.check_footprint(tmp_catalog_data))) #print area |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The footprint is actually calculated on the full set, not the tmp_catalog_data subsamples, so this output is a little misleading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed message to read "Total... area"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One change requested in this commit - remove the second area output.
descqa/CorrelationsTwoPoint.py
Outdated
for nj in range(N_jack): | ||
catalog_data_jk = dict(zip(catalog_data.keys(), [v[(jack_labels != nj)] for v in catalog_data.values()])) | ||
rand_cat, rr = self.generate_processed_randoms(catalog_data_jk) #get randoms for this footprint | ||
#print('nj = {}, area = {:.2f}'.format(nj, self.check_footprint(catalog_data_jk))) #check footprint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented out print statement, perhaps this should be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a note somewhere about the limitations of this test? In particular this assumes that the galaxy catalog is of equal depth over the full area, and that we have enough galaxies in the sample to measure the area.
@patricialarsen Committed a new version that addresses your comments. Added note to galaxy counts printout with caveats regarding area calculation. See here. Also removed extra printout and changed printout of area to say Total area. |
@patricialarsen Thanks for your review! I think I addressed everything. Let me know if there is anything else. |
Update to include jack-knife errors in w(theta) and to provide some cosmetic options for plotting.
Will post link to test when nersc is back up.