-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from LSSTDESC/u/yymao/composite-reader
New experimental feature: composite catalog reader
- Loading branch information
Showing
14 changed files
with
362 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 8 additions & 6 deletions
14
GCRCatalogs/catalog_configs/proto-dc2_v2.1.2_addon_knots.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
subclass_name: alphaq_addon.AlphaQAddonCatalog | ||
filename: /global/projecta/projectdirs/lsst/groups/CS/descqa/catalog/ANL_AlphaQ_v2.1.2.hdf5 | ||
lightcone: true | ||
version: "2.1.2" | ||
addon_filename: /global/projecta/projectdirs/lsst/groups/CS/descqa/catalog/protoDC2_knots_v2.1.2.hdf5 | ||
addon_group: knots | ||
subclass_name: composite.CompositeReader | ||
catalogs: | ||
- catalog_name: proto-dc2_v2.1.2 | ||
- catalog_name: knots | ||
matching_method: MATCHING_FORMAT | ||
subclass_name: alphaq_addon.AlphaQAddonCatalog | ||
addon_filename: /global/projecta/projectdirs/lsst/groups/CS/descqa/catalog/protoDC2_knots_v2.1.2.hdf5 | ||
addon_group: knots |
8 changes: 8 additions & 0 deletions
8
GCRCatalogs/catalog_configs/proto-dc2_v2.1.2_addon_tidal.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
subclass_name: composite.CompositeReader | ||
catalogs: | ||
- catalog_name: proto-dc2_v2.1.2_test | ||
matching_method: galaxy_id | ||
- catalog_name: tidal | ||
matching_method: galaxy_id | ||
subclass_name: alphaq_addon.AlphaQTidalCatalog | ||
filename: /global/projecta/projectdirs/lsst/groups/CS/descqa/catalog/tidal_247_protoDC2_v2.1.hdf5 |
16 changes: 9 additions & 7 deletions
16
GCRCatalogs/catalog_configs/proto-dc2_v3.0_addon_knots.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
subclass_name: alphaq_addon.AlphaQAddonCatalog | ||
filename: /global/projecta/projectdirs/lsst/groups/CS/descqa/catalog/ANL_AlphaQ_v3.0.hdf5 | ||
lightcone: true | ||
version: "3.0.0" | ||
md5: 1efca46756b59b75d23e5382ee97cd10 | ||
addon_filename: /global/projecta/projectdirs/lsst/groups/CS/descqa/catalog/protoDC2_knots_v3.0.hdf5 | ||
addon_group: knots | ||
subclass_name: composite.CompositeReader | ||
catalogs: | ||
- catalog_name: proto-dc2_v3.0 | ||
- catalog_name: knots | ||
matching_method: MATCHING_FORMAT | ||
subclass_name: alphaq_addon.AlphaQAddonCatalog | ||
filename: /global/projecta/projectdirs/lsst/groups/CS/descqa/catalog/ANL_AlphaQ_v3.0.hdf5 | ||
addon_filename: /global/projecta/projectdirs/lsst/groups/CS/descqa/catalog/protoDC2_knots_v3.0.hdf5 | ||
addon_group: knots |
6 changes: 6 additions & 0 deletions
6
GCRCatalogs/catalog_configs/proto-dc2_v3.0_addon_redmapper.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
subclass_name: composite.CompositeReader | ||
catalogs: | ||
- catalog_name: proto-dc2_v3.0_test | ||
matching_method: galaxyID | ||
- catalog_name: proto-dc2_v3.0_redmapper | ||
matching_method: galaxy_id |
6 changes: 6 additions & 0 deletions
6
GCRCatalogs/catalog_configs/proto-dc2_v4.3_addon_redmapper.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
subclass_name: composite.CompositeReader | ||
catalogs: | ||
- catalog_name: proto-dc2_v4.3_test | ||
matching_method: galaxy_id | ||
- catalog_name: proto-dc2_v4.3_redmapper | ||
matching_method: galaxy_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
subclass_name: alphaq.AlphaQGalaxyCatalog | ||
|
||
filename: /global/projecta/projectdirs/lsst/groups/CS/descqa/catalog/v4.3.full.all.hdf5 | ||
|
||
lightcone: true | ||
|
||
version: "4.0.0" | ||
|
||
creators: [ 'Andrew Benson', 'Andrew Hearin', 'Katrin Heitmann', 'Danila Korytov', 'Eve Kovacs'] | ||
|
||
description: | | ||
ProtoDC2 is a down-scaled version of the catalog to be generated for LSST-DESC DC2. | ||
For a description of the catalog and the methods, please see https://goo.gl/fXDQwP |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
subclass_name: composite.CompositeReader | ||
|
||
catalogs: | ||
- catalog_name: um_v0.1_test | ||
- catalog_name: shear | ||
matching_method: MATCHING_FORMAT | ||
subclass_name: cosmodc2.UMShearCatalog | ||
catalog_root_dir: /global/projecta/projectdirs/lsst/groups/CS/cosmoDC2/shear_addon | ||
catalog_path_template: umachine_color_mock_z_{}_{}_cutout_{}.hdf5 | ||
healpix_pixels: [564] | ||
zlo: 0 | ||
zhi: 1 | ||
cosmology: | ||
H0: 71.0 | ||
Om0: 0.2648 | ||
Ob0: 0.0448 | ||
check_file_metadata: false | ||
creators: [ 'Patricia Larsen'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
""" | ||
composite reader | ||
""" | ||
from GCR import CompositeCatalog, MATCHING_FORMAT, MATCHING_ORDER | ||
from .register import load_catalog, load_catalog_from_config_dict | ||
|
||
class CompositeReader(CompositeCatalog): | ||
def __init__(self, **kwargs): | ||
instances = [] | ||
identifiers = [] | ||
methods = [] | ||
for catalog_dict in kwargs['catalogs']: | ||
if 'subclass_name' in catalog_dict: | ||
catalog = load_catalog_from_config_dict(catalog_dict) | ||
else: | ||
catalog = load_catalog(catalog_dict['catalog_name']) | ||
instances.append(catalog) | ||
identifiers.append(catalog_dict.get('catalog_name')) | ||
method = catalog_dict.get('matching_method', 'MATCHING_FORMAT') | ||
if method == 'MATCHING_FORMAT': | ||
method = MATCHING_FORMAT | ||
elif method == 'MATCHING_ORDER': | ||
method = MATCHING_ORDER | ||
methods.append(method) | ||
super(CompositeReader, self).__init__(instances, identifiers, methods, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.8.0' | ||
__version__ = '0.8.1' |
Oops, something went wrong.