The roman_catalog_handler module provides functionality for handling catalog data from the Roman Space Telescope.
.. automodule:: roman_photoz.roman_catalog_handler :members: :undoc-members: :show-inheritance:
The following example demonstrates how to use the RomanCatalogHandler class to read and process a catalog file.
import os
from pathlib import Path
from roman_photoz.roman_catalog_handler import RomanCatalogHandler
# Ensure the TEST_BIGDATA environment variable is set
test_bigdata = os.getenv("TEST_BIGDATA")
if test_bigdata is None:
raise ValueError("Environment variable TEST_BIGDATA is not set")
reg_test_data = Path(test_bigdata)
# Specify the catalog file
test_cat = reg_test_data / "r0000101001001001001_0001_wfi01_cat.parquet"
# Create an instance of RomanCatalogHandler
catalog_handler = RomanCatalogHandler(test_cat.as_posix())
# Process the catalog
formatted_catalog = catalog_handler.process()
print("Catalog processing complete.")