astrochun / Evolution-of-Galaxies

Research with Dr. Chun Ly. I am working with a sample of ~4000 galaxies from the MACT and DEEP2 surveys. The goal is to determine a robust M-Z-SFR relation for galaxies at z<1 and examine its evolution over the past 8 billion years of cosmic time.
2 stars 0 forks source link

library: relative indexing #1

Closed cmccormick1 closed 4 years ago

cmccormick1 commented 5 years ago

Versions after 4/1/19 through 10/23/19 have incorrect relative indexing (starting in 8668ef7). The indices in those versions are the indices of the elements in the valid index array, not the actual valid index elements themselves. Versions before 4/1/19 and after 10/23/19 (fixed in 10/24/19 version: 979c84f) have indices of sources relative to passed in data table. The change that fixed it is in lines 101-103 in 979c84f.

cmccormick1 commented 4 years ago

Testing/Debugging Process: Downloaded a copy of the 4/1/19 version (8668ef7) to test old results against the newer code.

Test 1. In the 4/1/19 version (8668ef7), put sorting of masses after finding valid indices (like how it is in the current version of library.py):

Test 2. Reverted back to original sorting in 4/1/19 version (8668ef7) (i.e. sorted the list of masses before the valid_ind). Reran just for a sanity check; expecting them to be different.

Test 3. Changed ind_sort in the current version (061211b) to be valid_ind[argsort_valid_x] where argsort_valid_x = np.argsort(temp_x[valid_ind]).