-
Notifications
You must be signed in to change notification settings - Fork 22
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
Update to generate DESI-Y3 Lya mocks #581
base: main
Are you sure you want to change the base?
Conversation
@andreicuceu could review this too? I couldn't assign you as reviewer. |
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.
@HiramHerrera - I'm not super familiar with this script, but the changes look good.
In a couple of years from now, when we want to make Y5 mocks, it will be confusing to have release="Y5"
to refer to the forecasted final DESI instead of referring to the actual Y5 release, although I guess we could use either DR3 or whatever mountain is used to generate the Y5 release
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.
I'm not familiar with this script either, and the changes are quite long. Is there any particular part of the code that you'd like me to take a look at? Otherwise I'll let others review it.
Hi @HiramHerrera, I've been trying to test this branch, but I ran into an issue: I had a look at the seed catalog generated with It would also be useful to name the hdu |
Hi @andreicuceu In principle what you request should be doable. However, I'm concerned about the redshift in the catalog. The catalog generated by This would slightly alter the resulting correlations. Apart from that I can't think of other issue for picca. Maybe @paulmartini and Ting can comment on the necessary columns/HDUs for the BAL and DLA finders to work. |
That's a great point @HiramHerrera. So we should not use the seed catalog for downstream analysis. In that case do you have some suggestions on how to solve the issue? It looks like the problem is that |
@andreicuceu I think the best option would be to either make our own script (my personal preference) that we could add to lyatools. In this regard I think that @p-slash already has a working code (see desihub/desispec#2140) Or simply use an older version of the desicode for making the redshift catalog only (I use 23.1). What do you think? |
@HiramHerrera @andreicuceu adding to the question of whether making On the other, I think if someone have the time to bring back the |
Thanks for pointing me to that issue @HiramHerrera. So far I have indeed been using an older version of |
Apologies I didn't have the time to go through this yet. Regarding the catalog creation. Yes, I have a script: |
py/desisim/survey_release.py
Outdated
if 'TSNR2_LRG' in self.data.colnames: | ||
log.info('Getting effective exposure time in data catalog by 12.15*TSNR2_LRG.') | ||
exptime_data = 12.15*self.data['TSNR2_LRG'] | ||
elif 'TSNR2_LYA' in self.data.colnames: | ||
log.info('Getting effective exposure time in data catalog by 11.8*TSNR2_LYA.') | ||
exptime_data = 11.8*self.data['TSNR2_LYA'] | ||
elif 'TSNR2_QSO' in self.data.colnames: | ||
log.info('Getting effective exposure time in data catalog by 33.61*TSNR2_QSO.') | ||
exptime_data = 33.61*self.data['TSNR2_QSO'] | ||
else: | ||
raise ValueError("Can't compute effective exposure time. Data catalog columns should include TSNR2_LRG, TSNR2_LYA or TSNR2_QSO.") |
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.
What is the assumption for self.data
here? TSNR2_LRG
has the highest priority, so should you raise a big warning if that is not found? Or are you imagining that the absence of TSNR2_LRG
column is deliberate in order to run some tests using other columns, so a warning is not required?
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.
I added a warning if TSNR2_LRG
is not in the data catalog.
We use TSNR2_LRG as this is what the spectroscopic pipeline uses to define the effective exposure time. However I've found some catalogs without this column so I added the option to use other target templates SNR.
Maybe @julienguy can provide more insight here.
from desimodel.io import load_tiles | ||
from desimodel.footprint import tiles2pix, is_point_in_desi, radec2pix |
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.
Small readability comment: You can import load_tiles
as desimodel_load_tiles
so that it is easier to understand in the code below. Not a big deal.
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.
I left small comments for readability and best practices. I did not review the expected behavior of the code and its accuracy etc, so I left it to pipeline tests. Better to merge after the code has been tested.
I approve it as it is if you want to go ahead and merge.
Coming to the conversation late, but a few notes:
|
@sbailey what would be the recommended name for the redrock like files? We used I wonder if changing this name would fix the What do you think @alxogm, @julienguy? |
Hi @HiramHerrera, it will not fix all the compatibility issues but it will remove the need of a specific flag and, will make it easier to fix the remaining ones. I think is a good idea to use the current name for the catalogs, I believe the current name is |
This Pull Request includes updates in py/desisim/survey_release.py and the py/desisim/scripts/gen_qso_catalog.py script in order to be able to produce DESI-Y3 mocks.
Mayor updates:
survey_release.py
does not require HEALpix Pixel map of the number of tiles covering a region (NPASS) to function anymore. Instead it is internally generated based on atiles-<release>.fits
file within the DESI_SPECTRO_REDUX directory by default. This tile file might be an input if a custom footprint is desired.survey_release.py
now includes the option to select mock objects in order to mimicking the characteristics of non-qso targets included in the observed data catalog.Minor updates:
gen_qso_catalog.py
: changed--input-data
flag to None by default instead of the iron release observed Lya catalog.gen_qso_catalog.py
: default release is now "jura".gen_qso_catalog.py
: addition of two flags:--include-nonqso-targets
to include nonqso targets and--tiles-file
to use a custom footprint tiles.Example to make a jura mock seed catalog:
In the above example:
<input_data_catalog>
was set to:/global/cfs/cdirs/desi/users/martini/bal-catalogs/jura/QSO_cat_jura_main_dark_healpix_v1-bal.fits
for the Y3 mocks.