Changelog

Asgardpy 0.5.3 (2025-03-31)

API Changes

Bug Fixes

New Features

Maintenance

  • Updates code-blocks of the pending notebooks and re-adds sphinxcontrib-towncrier after 0.5.0 release [#202]

  • Extends test coverage and removes redundant checks. [#205]

Asgardpy 0.5.2 (2025-02-10)

API Changes

  • Update overall dependency of Gammapy to v1.3 and partly resolve Issue [#186]. [#190]

  • Adds basic support for HAWC data analysis and resolves Issue [#187]. [#200]

Bug Fixes

  • Fixes Issue [#193] and resolves problem of the changelog as introduced in PR [#191]. [#194]

New Features

Maintenance

  • Add an extended example of the usage for Asgardpy and partially resolves Issue [#188]. [#192]

  • Update usage of pydantic to be closer to that in Gammapy and resolves Issue [#175]. [#197]

  • Update the comparison between Asgardpy and the upcoming release of Gammapy and resolves Issue [#195]. [#199]

Asgardpy 0.5.1 (2024-10-29)

API Changes

Bug Fixes

  • Generalize functions to read and write Gammapy model config files via AsgardpyConfig. Separate some of the functions responsible for operations in a distinct asgardpy.config.operations module. [#179]

New Features

  • Clean-up code to check model preference, by creating a new stats.utils module containing common functions to be used. [#178]

  • Add the public sample data of CTAO-LST1 Crab Nebula data and fixes [#183] [#184]

Maintenance

  • Rebase for the Hotfix release v0.4.4 and update documentation regarding its usage. [#180]

  • Fixing Sphinx build issue caused by the upgrade from [#181] by pinning Towncrier. [#182]

  • Adding conda environment files and updating the documentation with its usage. [#185]

Asgardpy 0.5.0 (2024-06-24)

API Changes

  • Update overall dependency of Gammapy to v1.2 and resolves Issue [#152]. [#165]

  • Add supporting functions to generate correct intrinsic spectral model and flux points. Adds the new addition of PKS 2155 data to GAMMAPY_DATA which will be available with Gammapy v1.3 and using it to display an example notebook. Solves Issue [#169]. [#174]

Bug Fixes

New Features

  • Add an example notebook to explore filtering options for data and models in FoV and resolves Issue [#166]. [#172]

Maintenance

  • Fix the issue with the build of the virtual env [#171]

  • Update pre-commit dependencies and remove redundant arguments in pyproject [#173]

  • General clean-up of code. [#176]

Asgardpy 0.4.4 (2024-07-12)

Hotfix for 0.4.3 by including commits from [#161], [#171] and [#174].

API Changes

Bug Fixes

New Features

Maintenance

Asgardpy 0.4.3 (2024-01-27)

API Changes

Bug Fixes

New Features

  • Separate the functionality of reading from a Fermi-XML model file into a distinct function in gammapy module. Completes the Issue [#153]. [#155]

  • Add a temporary stats function to fetch pivot energy for any spectral model. This function will be present in the upcoming release of Gammapy v1.2.

    Also include Windows OS in CI tests. [#160]

Maintenance

  • Show Towncrier created fragments for changelog drafts before release of a new project version. [#151]

  • Adapt tox env and start using pre-commit hooks. Have CI also run on Mac OS. Completes the remaining tasks in the Issue [#127]. [#154]

  • Adapt code suggestions from Scientific Python Development Guide and remove some coverage redundancies. [#156]

  • Adapt code suggestions from Scrutinizer Code Quality scan. Use match-case instead of list of if-elif-else condition blocks. [#157]

  • Limit scipy version until Gammapy v1.2 fixes its dependency. [#158]

Asgardpy 0.4.2 (2023-11-20)

API Changes

Bug Fixes

  • Apply Bug fix on the definition of TimeIntervals config and usage in ObservationsConfig by changing it to just be a dict type and letting the ObservationsConfig have the obs_time as list of TimeIntervalsType. Fixes the issue [#144]. [#145]

New Features

  • Fixed project descriptions by correcting License id, changelog file link also added some more test coverage. [#137]

  • Expand test coverage and add a description for the additional zipped Fermi-LAT data. [#138]

  • Extend capacity to have more than 1 3D datasets, with any of them being able to add an extra FoV Background Model, to show the full support of the pipeline. [#139]

  • Implement Towncrier for maintaining PR changes as new fragments. [#141]

  • Adapt the basic Time format to use any format and list of intervals as part of BaseConfig. Remove redundant classes, adapt tests and use TimeIntervalsType as the main Time input type. [#142]

  • Extend the functionality of recursive_merge_dicts when comparing 2 lists of values with different lengths. [#143]

Maintenance

Asgardpy v0.4.1 (2023-09-27)

Bug fixes

  • Correct the calculation of Goodness of Fit stats as described in the Issue [#130]. Replaces the usage of Gammapy’s CountsStatistic functions with those in gammapy.stats.fit_statistics module, to evaluate the best fit (Observed) statistic and perfect fit (Expected) statistic for all types of Datasets used.

    Update the various notebooks, scripts and documentation accordingly.

    Update test coverage on analysis and data modules, along with adding copies of diffuse model files for the additional Fermi-LAT data to use name ids used by fermipy and enrico. [#132]

  • Replaced dynamic versioning to go back to static versioning as in the parent package template, before trying a proper resolution of Issue [#135]. [#136]

  • Update documentation to have separate pages for describing additional support for Asgardpy inputs, from the standard ones, mentioned in the overview page.

    Also updates test coverage for data.target and io modules. [#134]

  • Update test coverage on reading different XML models for Fermi-LAT data as supported by gammapy module of Asgardpy and move the zipped additional data to dev folder. [#133]

  • Updated pytests to follow proper code style with proper assert statements as mentioned in one of the 3 tasks in the Issue [#127]. [#131]

Maintenance

  • Restructure the package to follow some PEP guidelines as described in Issue [#125].

    Add a separate Citation file, move codespell_ignore_words file to dev folder, Contributing file to .github folder. Start to use dynamic versioning. [#126]

Asgardpy v0.4.0 (2023-08-31)

New Features

  • Add more tests to increase coverage and perform some basic clean-up of the tests. Optimize tests using flux-points analysis step and reading catalog data. [#122]

  • Add tests to cover some of the Gammapy tutorial examples, like the MWL joint fitting of different datasets, including reading from a FluxPointsDataset object. and fix the relevant code accordingly in the various modules.

    Have a generalized ModelComponent to include SkyModel and FoVBackgroundModel for reading Gammapy Models objects.

    Have a test for checking model preference script, instead of filling the jupyter notebook. [#121]

  • Add tests to various modules and extend support for CI test runs by increasing swapfile size of the system. Also allow conftest to check for existing gammapy-data in the system before running any tests with data.

    Update notebooks after running with the test data, the overall documentation about the tests and pytest options in pyproject.toml file.

    Fully resolves Issue [#55]. [#120]

Maintenance

  • Perform general cleanup and fix minor pending issues. [#124]

  • Add Code of Conduct to the package and Codecov support in CI. [#113]

API Changes

  • Restructure tests to reduce overall test time. [#123]

  • Restructure io by replacing current sub-module with input_dl3 and io_dl4 modules, containing functions related with DL3 and DL4 files.

    Adds public test data, as an addition to the existing Gammapy test data, by having a zip compressed file, containing Fermi-LAT data generated with fermipy for Crab Nebula observations. The CI checks for the presence of downloaded gammapy-data and it being saved in the environ path variable of the system, and only then unzips the additional data, in the same location, in a folder named fermipy-crab.

    Using these updated test data, starts building simple pytests by using test template config files in tests module. The additional support of DL4 data input, will help in replicating some tests done in Gammapy, to check the additional support by Asgardpy.

    See Issue [#55] for more details, as this PR, resolves yet another aspect of the Issue. [#114]

Asgardpy v0.3.6 (2023-08-05)

API Changes

  • Restructure statistics functions to be part of a separate stats module. Collect relevant information for estimating the goodness of fit stats, in the instrument_spectral_info dict variable, to be used only when the fit analysis step is completed. Update computation of fit statistics using internal Gammapy functions to get appropriate results. [#103]

  • Restructure pipeline to prepare to use public test data for resolving Issue [#55].

    Have a distinct module gammapy containing all functions for interoperatibility of other data formats with Gammapy format, for example, the XML model definition used by Fermi-LAT. Generalize this usage for any other model definition for future additional support. Update docstring with Fermi-LAT model functions NOT supported by this function for future tracking.

    Added function to read from a Gammapy AnalysisConfig file, into an AsgardpyConfig file for increased support.

    Add support for reading FoVBackgroundModel from config file.

    Move model template files into a separate folder. [#110]

Bug Fixes

  • Improve logging as per the Issue [#39]

    From recommendations of pylint code style, update pending docstrings of various functions and modules, fix logging strings. Also include flake8 and codespell settings in setup.cfg file and include codespell check in CI. [#102]

  • Fix estimation of Goodness of Fit statistics by removing the extra function on evaluating Test Statistic for Null Hypothesis and combining it into a new common function get_ts_target, to get the required TS values of both Null and Alternate Hypotheses, only for the region (binned coordinates) of the target source.

    Separate the counting of the total degrees of freedom, into total number of reco energy bins used and the number of free model parameters. [#106]

  • Resolve the issue of circular imports by restructuring analysis module to have separate scripts with AnalysisStepBase and AnalysisStep classes.

    Moved SkyPositionConfig to asgardpy.base.geom module and using imports from specific sub-modules when required. [#107]

  • Fix reading of models_file with the correct process. [#112]

Maintenance

  • Add codespell to dev-requirements. [#104]

  • Compress and update sphinx docs, by having documentation pages based on distinct modules. [#105]

  • Update python dependency to 3.11, added OpenSSF Best Practices badge in README and a dedicated Issue Tracker link in documentation. [#109]

Asgardpy v0.3.5 (2023-07-17)

API Changes

  • Restructure pipeline to regroup common functions, for base geometry and data reduction for GADF-based DL3 files for 1D and 3D dataset. Use DatasetsMaker for supporting parallel processing of DL4 dataset generation. See Issue [#85]

    Update support for Ring and FoV Background Makers, and have a separate common function for creating exclusion masks for datasets.

    Keep GADF-based DL3 input as default priority for generating 3D datasets.

    Have a simple test for importing main Asgardpy classes, and a simple script to run all Analysis steps of a given AsgardpyConfig file.

    Update basic docstrings of various functions and classes. [#94]

  • Restructure pipeline for better handling of model association, by adding support to use catalog data for getting the list of source models and for creating exclusion regions in the Field of View, using FoVBackgroundModel, renaming the variable, extended in target config section to add_fov_bkg_model, moving the application of exclusion mask onto the list of models to the set_models function and update these into the documentation page. Completing the remaining task in the Issue [#85]

    Group the processing of Analysis Steps into DL3 to DL4 and DL4 to DL5 stages. [#98]

  • Add a single function to get the chi2 and p-value of a given test statistic and degrees of freedom and generalize other stat functions, to use more specific variables. [#101]

Bug Fixes

  • Update documentation with new workflow image and the notebooks. [#97]

  • General clean-up and addition of docstrings to various Configs. [#99]

  • Fix the Changelog to be more descriptive. [#100]

Maintenance

  • Update documentation with citation link using Zenodo DOI and add the badge in README. [#95]

Asgardpy v0.3.4 (2023-07-02)

New Features

  • Add script to get most preferred spectral model fit based on the existing notebook. Also add extra supporting functions to get any model template config files, have a check on statistically preferred models based on Likelihood Ratio Test and Akaike Information Criterion and updating the notebook accordingly. [#87]

API Changes

  • Combine the various Sky Position configs into a single SkyPositionConfig, with the information of the coordinate frame, longitude, latitude and angular radius, where for defining point source, the angular radius has a default value of 0 degree. [#88]

Bug Fixes

  • Update documentation by replacing the model parameter renaming table and the extended support added in previous PR. [#89]

  • Update with usage of common multiprocessing with Gammapy for generating DL4 datasets and Flux Points Estimation. [#90]

Maintenance

  • Constrain pydantic and autodoc-pydantic versions until corresponding updates are made in Gammapy. [#92]

Asgardpy v0.3.3 (2023-06-20)

Bug Fixes

  • Fix sphinx documentation build issue by updating the readthedocs config file with build information. [#78]

  • Try to fix sphinx documentation build issue by removing the deprecated python.version information. [#79]

  • Update Sphinx documentation for all modules, use autodoc_pydantic, divide the documentation of asgardpy.data.target into 2 separate pages and fix missing functions in the documentation.

    Update the template config file and have a copy for documentation.

    Remove redundant Analysis steps from the list. [#81]

Maintenance

  • Extend support to Gammapy v1.1 by adding parallel processing support and update general dependency requirement conditions. [#84]

Asgardpy v0.3.2 (2023-04-28)

New Features

  • Add the custom spectral models to the Gammapy registry while using Asgardpy. [#77]

Asgardpy v0.3.1 (2023-04-28)

Maintenance

  • Remove support of Python 3.8. [#76]

Asgardpy v0.3.0 (2023-04-28)

Bug Fixes

  • Update config module with a function to perform recursive merging, see Issue [#71]. This is used when the model config is provided as a separate file, which does not contain a model name. Examples of such files are also created for a variety of spectral models.

    Using the multiple available options for spectral models, one can check for a statistically preferred model for a given dataset, by using methods like Likelihood Ratio Test, Akaike Information Criterion, etc. A notebook is added to demonstrate this procedure.

    Also fixed a URL link of a badge in README. [#72]

  • Update README with more description and a Build status badge.

    Update general documentation, change the description of asgardpy from a package to a pipeline and add a setup.cfg file with the general description of Asgardpy. [#73]

  • Fix Safe Mask reduction code for 1D Dataset and add a custom Spectral Model of Broken Power Law with index_diff as a parameter, to get the second Power Law index, with respect to the index of the first one. [#74]

API Changes

  • Restructure the pipeline to have a distinct base module, to avoid circular imports issue and shifting the modules and classes for defining the base class for Analysis Steps, base geometry of datasets and dataset reduction methods.

    Sort the imports for better coding practice.

    Remove redundant glob_dict_std variable in io module.

    Update documentation and notebooks accordingly. [#75]

Asgardpy v0.2.0 (2023-04-19)

Bug Fixes

  • Update documentation with correct URL paths, providing proper descriptions of various modules and the main working of the pipeline and some formatting corrections. [#54]

  • Update notebooks. [#69]

New Features

  • Build some custom SpectralModel classes. [#59]

  • Add support for common data types for different instruments by have a standard dl3_type as gadf-dl3 instead of instrument specific like lst-1 and improve the conditions for checking its different values. See Issue [#34] for more details. [#65]

  • Add support for selecting various spectral model parameters in a given Field of View, by generalizing the function apply_selection_mask_to_models in the asgardpy.data.target module. [#67]

API Changes

  • Remove dependency of hard-coded Fermi-LAT files structure to move towards a generalized 3D datasets input.

    Expand the scope of creating exclusion mask for 1D dataset. [#56]

  • Adding the possibility to use a separate yaml file for providing Target source model information and reading the file paths models_file variable.

    Fix some variable names to be the same as used in Gammapy and for moving towards generalizing the pipeline.

    Separate documentation of each sub-module of asgardpy.data module. [#57]

  • Adding support of reading EBL models from fits files.

    Also adds to the index page of the documentation, an introduction to the package and moving the Development links to the sidebar. [#58]

  • Incorporate input of Fermi-LAT files, generated with fermipy into Dataset3DGeneration function by generalizing the process of defining the base geometry of a Counts Map, reading diffuse model names from the XML file and some re-arrangement of the general procedure.

    Add functions to read spectral and spatial model information from different formats to the standard Gammapy format, and improve the asgardpy.data.target module in general.

    Rename some variables in data and io modules accordingly. [#61]

  • Remove features from the package that are not essential and can be used with Gammapy alone. These are the Analysis steps of light-curve-estimator, excess-map, DL4Files class for writing data products to separate files and asgardpy.utils module, containing basic plot functions. These are listed in the Issue [#60]. [#62]

  • Generalize the usage of GeomConfig for both type of Datasets. Let user define non-spatial axes to define the base geometry, currently being only of Energy, differentiating from the energy parameters used for generating SEDs in flux-points Analysis Step, using spectral_energy_range component. See connected Issue [#28].

    Generalize mapping of Models from different format to Gammapy-compliant format, by having two separate functions, params_renaming_to_gammapy and params_rescale_to_gammapy for Spectral Model. See Issue [#52] for more detail.

    Extend support to map PLSuperExpCutoff2 spectral model of Fermi-XML type and GaussianSpatialModel.

    Add images in the documentation to show the workflow of the package and the model parameters mapping from Fermi-XML type to Gammapy type.

    Have the option to read 3D dataset information when no distinct key names are provided. [#64]

  • Generalize reading energy axes by using a distinct function get_energy_axis in asgardpy.data.geom module. Let spectral_energy_range be of MapAxesConfig type for more uniform reading of this information. Also allow for providing custom energy bin edges for this variable, to be used to create SEDs. [#68]

  • Remove GTI selections from 3D datasets, as at least for Fermi-LAT datasets, the files are produced for a select set of GTI time intervals amongst other selections and the various files produced, are exclusive for these selections.

    GADF-DL3 type of 1D dataset can still have GTI selection option, but it should correspond to the GTI interval for the Fermi-LAT data. [#70]

Asgardpy v0.1 (2023-02-16)

New Features

  • Start adding requirements and dependencies and use a minimum Python version of 3.8 instead of 3.7. [#6]

  • Start with some I/O classes and functions for DL3 and DL4 files in a io module. [#7]

  • Start entering Fit and plot functions in analysis module. [#11]

  • Proposal for the initial template for the pipeline to perform the following steps,

    1. Read the various instrument DL3 files

    2. Perform any and all data reductions

    3. Generate Datasets for each instrument

    4. Pass the list of all such Datasets to the Gammapy Fit function to get the best-fit model

    The other functionalities can be left to the user to perform without using Asgardpy. [#15]

  • Build further the pipeline structure, by generalizing the dataset production as 1D or 3D, let the DL3Files class be the base class for all DL3 Files input.

    Also include a release drafter template in .github folder. [#16]

  • Include the release-drafter in github CI workflow. [#18]

  • Begin preparations for adding workable scripts. Restructure classes of Analysis Steps for creating 1/3 D datasets to only have a single Analysis Step to be run for for each type of dataset and to have the various components for data selection, reduction and creation of the DL4 dataset, as a separate class which will be called when running the particular AnalysisStep.

    Rename the module responsible for the AnalysisSteps of working with the DL4 datasets, to Fit Models, Flux Points and Light Curve Estimation, to asgardpy.data.dl4.

    Add more configuration options for defining Background Reduction Makers, using currently only “reflected” and “wobble” RegionsFinder methods.

    Move the functions for Models assignment into asgardpy.data.target module.

    Improve the method of DL3 files config input in the asgardpy.io module.

    Add AsgardpyAnalysis class that handles running of all Analysis Steps, based on the Gammapy HLI Analysis class. [#19]

  • Improve reading Models and assigning them to DL4 datasets, to be closer to the functionality of Gammapy. Move all such functions to the target module. See Issue [#29] for more details.

    Introduce a separate function to read Gammapy models from the AsgardpyConfig information and also to convert the Models information from XML model of FermiTools to Gammapy standard.

    Have a new object of AsgardpyAnalysis as final_model to make it easier to read list of models before and after assignment to DL4 datasets. [#31]

  • Adding plotting functions into a separate module asgardpy.utils and update the AnalaysisStep flux-points by using constant number of energy bins per decade for each dataset, but keeping the range within each dataset’s energy axes. [#32]

  • Start using GTI time intervals for creating DL4 datasets and light-curve analysis step. See Issue [#30] for more details. [#35]

  • Start adding example notebooks and starting with a single notebook for the full analysis. [#37]

  • Addition of instrument-specific spectral parameters like spectral_energy_range which can take custom energy edges as well. [#41]

  • Add notebooks showing each analysis step separately. [#43]

API Changes

  • Restructure pipeline to make it user-friendly and to follow the initiative in the Gammapy PR [#3852]. See Issue [#24] for more details.

    Have Asgardpy follow the workflow of the HLI in Gammapy more closely, by having a Config class and an Analysis class, named as AsgardpyConfig and AsgardpyAnalysis respectively, using pydantic.

    Create a Gammapy Registry for all the AnalysisSteps.

    Define Base classes for all Config classes and Analysis Steps, and separate modules for defining base geometries for DL4 datasets and various dataset reduction makers, as geom and reduction respectively.

    Rename the Config Target_model to target which will contain the target source information, required for the high-level analysis.

    Extend support for various I/O options in the io module

    Distinguish the 1/3 Dataset Config information with the associated Dataset type as used in Gammapy. [#26]

  • Start compressing the code in various processes to reduce total analysis time. [#36]

  • Improve the scope to add multiple exclusion regions as a list of RegionsConfig, thus removing some hard-coded features. [#45]

  • Optimize Models assignment with additional inputs of list of dataset names and the name of the target source, to read from either the config or the XML file.

    Add a separate notebook, showing the Asgardpy processes related with Models. [#46]

  • Update reading of Model parameters from XML file, by including the spectrum_type information as defined in the original format. This helps for Spectral Models like Exponential Cutoff Power Law, Broken Power Law and Super-Exponential Cutoff Power Law as used in the 4FGL catalog, where Gammapy uses different formulae and parameter names. Resolves a part of the Issue [#52]. [#53]

Bug Fixes

  • Fixes python_requires version in setup.py. [#8]

  • Try to fix some coding styles to avoid test errors by using isort and suggestions from pylint. [#10]

  • Update Changelog and fix an earlier commit change. [#17]

  • Fix adding exclusion regions in 3D dataset and assuming a CircleAnnulusSkyRegion to be the first exclusion region type. [#40]

  • Fixing assignment of Dataset models to be done in the analysis module and not in each DL4 dataset creation module.

    Check for diffuse background models before enlisting them, and perform any additional tasks as required.

    Have the model information of the target source, read from XML file, be the first entry in the list of Models.

    Correct the parameter values as defined in Fermi-XML models, by updating the units, scaling factors, range of values, and generating a list of Gammapy Parameter objects, to then generate the respective Models object. Add links to the Fermi-XML definitions for reference in docstrings.

    Fix the condition on when to use the model information for the target source, given in the AsgardpyConfig file or continue with the information in the XML file. [#42]

  • Fixing Flux Points Analysis step, to get instrument-specific flux points by using instrument_spectral_info dict object, containing the relevant instrument-specific information.

    This information is used to sort the datasets provided for the flux-points step, with the respective energy binning and dataset names. [#44]

  • Cleaning of logging information and updating doc-strings. [#47]

  • Fix mypy check errors in default values of different variables. [#48]

  • Fix variable assignment issue from previous PR by using a new Config variable PathType which uses strings of paths and reads them as pathlib.Path objects. [#50]

  • Clean the pipeline from all outputs, irrelevant comments and reference to any private data in config files or notebooks. [#51]