Loading src/lsst_inaf_agile/catalog_agn.py +25 −2 Original line number Diff line number Diff line Loading @@ -39,8 +39,6 @@ FLUXES = {} try: # Pre-load the posterior distribution for the AGN SED logger.info("Reading in the posterior distribution...") # POSTERIOR_DISTRIBUTION = pd.read_csv(f"{ROOT}/posteriors/posterior.dat", sep=' ') # POSTERIOR_DISTRIBUTION = pd.read_csv(f"{ROOT}/data/posteriors/posterior_2024_05_20.dat", sep=' ') POSTERIOR_DISTRIBUTION = pd.read_csv(f"{ROOT}/data/posteriors/posterior_frozen.dat", sep=" ") PARAMETER_NAMES = POSTERIOR_DISTRIBUTION.columns except FileNotFoundError: Loading @@ -48,6 +46,11 @@ except FileNotFoundError: class CatalogAGN: """ AGN catalog class """ def __init__( self, dirname, Loading @@ -58,6 +61,26 @@ class CatalogAGN: merloni2014, filter_db="data/egg/share/filter-db/db.dat", ): """ Initialize an AGN catalog. Parameters ---------- dirname : str directory name to write the catalog to catalog_galaxy : catalog_galaxy.CatalogGalaxy underlying galaxy catalog type_plambda : str assumed p(lambda) save_sed : bool save AGN SEDs to file seed : int random number seed merloni2014 : merloni2014.Merloni2014 assumed Merloni2014 obscuration model filter_db : str, optional filename of the EGG filter database (db.dat) """ self.dirname = dirname self.catalog_galaxy = catalog_galaxy self.type_plambda = type_plambda Loading src/lsst_inaf_agile/example_benchmarks.pydeleted 100644 → 0 +0 −14 Original line number Diff line number Diff line """An example module containing simplistic methods under benchmarking.""" import random import time def runtime_computation() -> None: """Runtime computation consuming between 0 and 5 seconds.""" time.sleep(random.uniform(0, 5)) def memory_computation() -> list[int]: """Memory computation for a random list up to 512 samples.""" return [0] * random.randint(0, 512) src/lsst_inaf_agile/example_module.pydeleted 100644 → 0 +0 −35 Original line number Diff line number Diff line """An example module containing simplistic functions.""" def greetings() -> str: """A friendly greeting for a future friend. Example: >>> greetings() 'Hello from LINCC-Frameworks!' Note: this example becomes a unit test via doctests Returns ------- str A typical greeting from a software engineer. """ return "Hello from LINCC-Frameworks!" def meaning() -> int: """The meaning of life, the universe, and everything. Example: >>> meaning() 42 Note: this example becomes a unit test via doctests Returns ------- int The meaning of life. """ return 42 Loading
src/lsst_inaf_agile/catalog_agn.py +25 −2 Original line number Diff line number Diff line Loading @@ -39,8 +39,6 @@ FLUXES = {} try: # Pre-load the posterior distribution for the AGN SED logger.info("Reading in the posterior distribution...") # POSTERIOR_DISTRIBUTION = pd.read_csv(f"{ROOT}/posteriors/posterior.dat", sep=' ') # POSTERIOR_DISTRIBUTION = pd.read_csv(f"{ROOT}/data/posteriors/posterior_2024_05_20.dat", sep=' ') POSTERIOR_DISTRIBUTION = pd.read_csv(f"{ROOT}/data/posteriors/posterior_frozen.dat", sep=" ") PARAMETER_NAMES = POSTERIOR_DISTRIBUTION.columns except FileNotFoundError: Loading @@ -48,6 +46,11 @@ except FileNotFoundError: class CatalogAGN: """ AGN catalog class """ def __init__( self, dirname, Loading @@ -58,6 +61,26 @@ class CatalogAGN: merloni2014, filter_db="data/egg/share/filter-db/db.dat", ): """ Initialize an AGN catalog. Parameters ---------- dirname : str directory name to write the catalog to catalog_galaxy : catalog_galaxy.CatalogGalaxy underlying galaxy catalog type_plambda : str assumed p(lambda) save_sed : bool save AGN SEDs to file seed : int random number seed merloni2014 : merloni2014.Merloni2014 assumed Merloni2014 obscuration model filter_db : str, optional filename of the EGG filter database (db.dat) """ self.dirname = dirname self.catalog_galaxy = catalog_galaxy self.type_plambda = type_plambda Loading
src/lsst_inaf_agile/example_benchmarks.pydeleted 100644 → 0 +0 −14 Original line number Diff line number Diff line """An example module containing simplistic methods under benchmarking.""" import random import time def runtime_computation() -> None: """Runtime computation consuming between 0 and 5 seconds.""" time.sleep(random.uniform(0, 5)) def memory_computation() -> list[int]: """Memory computation for a random list up to 512 samples.""" return [0] * random.randint(0, 512)
src/lsst_inaf_agile/example_module.pydeleted 100644 → 0 +0 −35 Original line number Diff line number Diff line """An example module containing simplistic functions.""" def greetings() -> str: """A friendly greeting for a future friend. Example: >>> greetings() 'Hello from LINCC-Frameworks!' Note: this example becomes a unit test via doctests Returns ------- str A typical greeting from a software engineer. """ return "Hello from LINCC-Frameworks!" def meaning() -> int: """The meaning of life, the universe, and everything. Example: >>> meaning() 42 Note: this example becomes a unit test via doctests Returns ------- int The meaning of life. """ return 42