Changelog¶
Asgardpy 0.5.3 (2025-03-31)¶
API Changes¶
Bug Fixes¶
New Features¶
Maintenance¶
Asgardpy 0.5.2 (2025-02-10)¶
API Changes¶
Bug Fixes¶
New Features¶
Maintenance¶
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 distinctasgardpy.config.operationsmodule. [#179]
New Features¶
Maintenance¶
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_DATAwhich will be available with Gammapy v1.3 and using it to display an example notebook. Solves Issue [#169]. [#174]
Bug Fixes¶
New Features¶
Maintenance¶
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
gammapymodule. 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-caseinstead of list ofif-elif-elsecondition blocks. [#157]Limit scipy version until Gammapy v1.2 fixes its dependency. [#158]
Asgardpy 0.4.2 (2023-11-20)¶
API Changes¶
Bug Fixes¶
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 useTimeIntervalsTypeas the main Time input type. [#142]Extend the functionality of
recursive_merge_dictswhen 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
CountsStatisticfunctions with those ingammapy.stats.fit_statisticsmodule, 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
analysisanddatamodules, along with adding copies of diffuse model files for the additional Fermi-LAT data to use name ids used byfermipyandenrico. [#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.targetandiomodules. [#134]Update test coverage on reading different XML models for Fermi-LAT data as supported by
gammapymodule of Asgardpy and move the zipped additional data todevfolder. [#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¶
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
FluxPointsDatasetobject. and fix the relevant code accordingly in the various modules.Have a generalized
ModelComponentto includeSkyModelandFoVBackgroundModelfor 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
conftestto check for existinggammapy-datain 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.tomlfile.
Maintenance¶
API Changes¶
Restructure tests to reduce overall test time. [#123]
Restructure
ioby replacing current sub-module withinput_dl3andio_dl4modules, 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-LATdata generated withfermipyfor Crab Nebula observations. The CI checks for the presence of downloadedgammapy-dataand 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 namedfermipy-crab.Using these updated test data, starts building simple pytests by using test template config files in
testsmodule. 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
statsmodule. Collect relevant information for estimating the goodness of fit stats, in theinstrument_spectral_infodict variable, to be used only when thefitanalysis 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
gammapycontaining 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
AnalysisConfigfile, into anAsgardpyConfigfile for increased support.Add support for reading
FoVBackgroundModelfrom 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.cfgfile 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
AnalysisStepBaseandAnalysisStepclasses.Moved
SkyPositionConfigtoasgardpy.base.geommodule and using imports from specific sub-modules when required. [#107]Fix reading of
models_filewith the correct process. [#112]
Maintenance¶
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
DatasetsMakerfor 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
AsgardpyConfigfile.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,extendedintargetconfig section toadd_fov_bkg_model, moving the application of exclusion mask onto the list of models to theset_modelsfunction 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
chi2andp-valueof a given test statistic and degrees of freedom and generalize other stat functions, to use more specific variables. [#101]
Bug Fixes¶
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¶
Maintenance¶
Constrain
pydanticandautodoc-pydanticversions 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.versioninformation. [#79]Update Sphinx documentation for all modules, use
autodoc_pydantic, divide the documentation ofasgardpy.data.targetinto 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
configmodule 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
asgardpyfrom apackageto apipelineand add asetup.cfgfile 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_diffas 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
basemodule, 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_stdvariable iniomodule.Update documentation and notebooks accordingly. [#75]
Asgardpy v0.2.0 (2023-04-19)¶
Bug Fixes¶
New Features¶
Build some custom
SpectralModelclasses. [#59]Add support for common data types for different instruments by have a standard
dl3_typeasgadf-dl3instead of instrument specific likelst-1and 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_modelsin theasgardpy.data.targetmodule. [#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_filevariable.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.datamodule. [#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
Dataset3DGenerationfunction 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.targetmodule in general.Rename some variables in
dataandiomodules 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,DL4Filesclass for writing data products to separate files andasgardpy.utilsmodule, containing basic plot functions. These are listed in the Issue [#60]. [#62]Generalize the usage of
GeomConfigfor 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 influx-pointsAnalysis Step, usingspectral_energy_rangecomponent. See connected Issue [#28].Generalize mapping of Models from different format to Gammapy-compliant format, by having two separate functions,
params_renaming_to_gammapyandparams_rescale_to_gammapyfor Spectral Model. See Issue [#52] for more detail.Extend support to map
PLSuperExpCutoff2spectral model of Fermi-XML type andGaussianSpatialModel.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
keynames are provided. [#64]Generalize reading energy axes by using a distinct function
get_energy_axisinasgardpy.data.geommodule. Letspectral_energy_rangebe ofMapAxesConfigtype 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
iomodule. [#7]Start entering Fit and plot functions in
analysismodule. [#11]Proposal for the initial template for the pipeline to perform the following steps,
Read the various instrument DL3 files
Perform any and all data reductions
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
DL3Filesclass be the base class for all DL3 Files input.Also include a release drafter template in
.githubfolder. [#16]Include the
release-drafterin 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
AnalysisStepsof working with the DL4 datasets, to Fit Models, Flux Points and Light Curve Estimation, toasgardpy.data.dl4.Add more configuration options for defining Background Reduction Makers, using currently only “reflected” and “wobble”
RegionsFindermethods.Move the functions for Models assignment into
asgardpy.data.targetmodule.Improve the method of DL3 files config input in the
asgardpy.iomodule.Add
AsgardpyAnalysisclass that handles running of all Analysis Steps, based on the Gammapy HLIAnalysisclass. [#19]Improve reading Models and assigning them to DL4 datasets, to be closer to the functionality of Gammapy. Move all such functions to the
targetmodule. See Issue [#29] for more details.Introduce a separate function to read Gammapy models from the
AsgardpyConfiginformation and also to convert the Models information from XML model of FermiTools to Gammapy standard.Have a new object of
AsgardpyAnalysisasfinal_modelto make it easier to read list of models before and after assignment to DL4 datasets. [#31]Adding plotting functions into a separate module
asgardpy.utilsand update the AnalaysisStepflux-pointsby 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-curveanalysis 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_rangewhich 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
Configclass and anAnalysisclass, named asAsgardpyConfigandAsgardpyAnalysisrespectively, usingpydantic.Create a Gammapy
Registryfor all theAnalysisSteps.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
geomandreductionrespectively.Rename the Config
Target_modeltotargetwhich will contain the target source information, required for the high-level analysis.Extend support for various I/O options in the
iomoduleDistinguish 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_typeinformation 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_requiresversion insetup.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
CircleAnnulusSkyRegionto be the first exclusion region type. [#40]Fixing assignment of Dataset models to be done in the
analysismodule 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
Parameterobjects, 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
AsgardpyConfigfile 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_infodict object, containing the relevant instrument-specific information.This information is used to sort the datasets provided for the
flux-pointsstep, 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
PathTypewhich uses strings of paths and reads them aspathlib.Pathobjects. [#50]Clean the pipeline from all outputs, irrelevant comments and reference to any private data in config files or notebooks. [#51]