Skip to content

Commit

Permalink
Sort contents of __all__, remove duplicated entries
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnoe committed Jan 31, 2022
1 parent cd66826 commit 0928239
Show file tree
Hide file tree
Showing 16 changed files with 101 additions and 134 deletions.
2 changes: 1 addition & 1 deletion gammapy/astro/darkmatter/__init__.py
Expand Up @@ -8,7 +8,7 @@


__all__ = [
"PrimaryFlux",
"DarkMatterAnnihilationSpectralModel",
"JFactory",
"PrimaryFlux",
]
28 changes: 14 additions & 14 deletions gammapy/astro/population/__init__.py
Expand Up @@ -33,26 +33,26 @@


__all__ = [
"make_catalog_random_positions_cube",
"make_catalog_random_positions_sphere",
"make_base_catalog_galactic",
"add_snr_parameters",
"add_pulsar_parameters",
"add_pwn_parameters",
"add_observed_parameters",
"CaseBattacharya1998",
"Exponential",
"FaucherKaspi2006",
"FaucherKaspi2006VelocityBimodal",
"FaucherKaspi2006VelocityMaxwellian",
"FaucherSpiral",
"LogSpiral",
"Lorimer2006",
"Paczynski1990",
"Paczynski1990Velocity",
"ValleeSpiral",
"YusifovKucuk2004",
"YusifovKucuk2004B",
"Exponential",
"LogSpiral",
"FaucherSpiral",
"ValleeSpiral",
"add_observed_parameters",
"add_pulsar_parameters",
"add_pwn_parameters",
"add_snr_parameters",
"make_base_catalog_galactic",
"make_catalog_random_positions_cube",
"make_catalog_random_positions_sphere",
"radial_distributions",
"FaucherKaspi2006VelocityMaxwellian",
"FaucherKaspi2006VelocityBimodal",
"Paczynski1990Velocity",
"velocity_distributions",
]
4 changes: 2 additions & 2 deletions gammapy/astro/source/__init__.py
Expand Up @@ -5,9 +5,9 @@
from .snr import SNR, SNRTrueloveMcKee

__all__ = [
"Pulsar",
"SimplePulsar",
"PWN",
"Pulsar",
"SNR",
"SNRTrueloveMcKee",
"SimplePulsar",
]
8 changes: 4 additions & 4 deletions gammapy/data/__init__.py
Expand Up @@ -14,13 +14,13 @@
__all__ = [
"DataStore",
"EventList",
"ObservationFilter",
"FixedPointingInfo",
"GTI",
"HDUIndexTable",
"ObservationTable",
"Observation",
"ObservationFilter",
"ObservationTable",
"Observations",
"PointingInfo",
"observatory_locations",
"FixedPointingInfo",
"PointingInfo"
]
11 changes: 2 additions & 9 deletions gammapy/datasets/__init__.py
Expand Up @@ -10,20 +10,13 @@

__all__ = [
"DATASET_REGISTRY",
# core
"Dataset",
"Datasets",
# flux_points
"FluxPointsDataset",
# map
"create_map_dataset_geoms",
"MapDataset",
"MapDatasetOnOff",
# simulate
"MapDatasetEventSampler",
# spectrum
"MapDatasetOnOff",
"SpectrumDataset",
"SpectrumDatasetOnOff",
"create_map_dataset_geoms",
]

__all__.extend(cls.__name__ for cls in DATASET_REGISTRY)
12 changes: 6 additions & 6 deletions gammapy/irf/__init__.py
Expand Up @@ -24,22 +24,22 @@


__all__ = [
"Background3D",
"Background2D",
"EnergyDispersion2D",
"Background3D",
"EDispKernel",
"EDispKernelMap",
"EDispMap",
"EffectiveAreaTable2D",
"EnergyDependentMultiGaussPSF",
"EnergyDispersion2D",
"IRF_REGISTRY",
"PSF3D",
"PSFKernel",
"PSFKing",
"PSFMap",
"ParametricPSF",
"EnergyDependentMultiGaussPSF",
"PSFKing",
"PSF3D",
"load_cta_irfs",
"load_irf_dict_from_file",
"IRF_REGISTRY",
]


Expand Down
4 changes: 2 additions & 2 deletions gammapy/irf/edisp/__init__.py
Expand Up @@ -3,8 +3,8 @@
from .map import EDispMap, EDispKernelMap

__all__ = [
"EnergyDispersion2D",
"EDispKernel",
"EDispMap",
"EDispKernelMap",
"EDispMap",
"EnergyDispersion2D",
]
14 changes: 6 additions & 8 deletions gammapy/makers/__init__.py
Expand Up @@ -31,18 +31,16 @@
"""Registry of maker classes in Gammapy."""

__all__ = [
"MAKER_REGISTRY",
"Maker",
"ReflectedRegionsFinder",
"ReflectedRegionsBackgroundMaker",
"AdaptiveRingBackgroundMaker",
"DatasetsMaker",
"FoVBackgroundMaker",
"MAKER_REGISTRY",
"Maker",
"MapDatasetMaker",
"PhaseBackgroundMaker",
"ReflectedRegionsBackgroundMaker",
"ReflectedRegionsFinder",
"RingBackgroundMaker",
"MapDatasetMaker",
"DatasetsMaker",
"SafeMaskMaker",
"SpectrumDatasetMaker",
]

__all__.extend(cls.__name__ for cls in MAKER_REGISTRY)
4 changes: 2 additions & 2 deletions gammapy/makers/background/__init__.py
Expand Up @@ -5,10 +5,10 @@


__all__ = [
"AdaptiveRingBackgroundMaker",
"FoVBackgroundMaker",
"PhaseBackgroundMaker",
"ReflectedRegionsFinder",
"ReflectedRegionsBackgroundMaker",
"ReflectedRegionsFinder",
"RingBackgroundMaker",
"AdaptiveRingBackgroundMaker",
]
24 changes: 8 additions & 16 deletions gammapy/maps/__init__.py
Expand Up @@ -11,28 +11,20 @@


__all__ = [
# axes
"MapAxes",
"MapAxis",
"TimeMapAxis",
"LabelMapAxis",
# coord
"MapCoord",
# core
"Map",
# geom
"Geom",
# hpx
"HpxMap",
"HpxGeom",
"HpxMap",
"HpxNDMap",
# maps
"LabelMapAxis",
"Map",
"MapAxes",
"MapAxis",
"MapCoord",
"Maps",
# region
"RegionGeom",
"RegionNDMap",
# wcs
"WcsMap",
"TimeMapAxis",
"WcsGeom",
"WcsMap",
"WcsNDMap",
]
2 changes: 1 addition & 1 deletion gammapy/maps/hpx/__init__.py
Expand Up @@ -4,7 +4,7 @@


__all__ = [
"HpxMap",
"HpxGeom",
"HpxMap",
"HpxNDMap",
]
2 changes: 1 addition & 1 deletion gammapy/maps/wcs/__init__.py
Expand Up @@ -4,7 +4,7 @@


__all__ = [
"WcsMap",
"WcsGeom",
"WcsMap",
"WcsNDMap",
]
3 changes: 0 additions & 3 deletions gammapy/modeling/__init__.py
Expand Up @@ -6,11 +6,8 @@


__all__ = [
# covariance
"Covariance",
# fit
"Fit",
# parameter
"Parameter",
"Parameters",
]
101 changes: 44 additions & 57 deletions gammapy/modeling/models/__init__.py
Expand Up @@ -67,72 +67,64 @@


__all__ = [
"Parameter",
"Parameters",
# core
"ModelBase",
"DatasetModels",
"FoVBackgroundModel",
"MODEL_REGISTRY",
"Model",
"ModelBase",
"Models",
"DatasetModels",
# cube
"Parameter",
"Parameters",
"SPATIAL_MODEL_REGISTRY",
"SPECTRAL_MODEL_REGISTRY",
"SkyModel",
"FoVBackgroundModel",
"TEMPORAL_MODEL_REGISTRY",
"TemplateNPredModel",
"create_fermi_isotropic_diffuse_model",
# spatial
'SpatialModel',
'PointSpatialModel',
'GaussianSpatialModel',
'GeneralizedGaussianSpatialModel',
'DiskSpatialModel',
'ShellSpatialModel',
'Shell2SpatialModel',
'ConstantSpatialModel',
'BrokenPowerLawSpectralModel',
'CompoundSpectralModel',
'ConstantFluxSpatialModel',
'TemplateSpatialModel',
# spectral
'scale_plot_flux',
'integrate_spectrum',
'SpectralModel',
'ConstantSpatialModel',
'ConstantSpectralModel',
'CompoundSpectralModel',
'PowerLawSpectralModel',
'PowerLawNormSpectralModel',
'ConstantTemporalModel',
'DiskSpatialModel',
'EBLAbsorptionNormSpectralModel',
'ExpCutoffPowerLaw3FGLSpectralModel',
'ExpCutoffPowerLawNormSpectralModel',
'ExpCutoffPowerLawSpectralModel',
'ExpDecayTemporalModel',
'GaussianSpatialModel',
'GaussianSpectralModel',
'GaussianTemporalModel',
'GeneralizedGaussianSpatialModel',
'LightCurveTemplateTemporalModel',
'LinearTemporalModel',
'LogParabolaNormSpectralModel',
'LogParabolaSpectralModel',
'MeyerCrabSpectralModel',
'NaimaSpectralModel',
'PiecewiseNormSpectralModel',
'PointSpatialModel',
'PowerLaw2SpectralModel',
'BrokenPowerLawSpectralModel',
'PowerLawNormSpectralModel',
'PowerLawSpectralModel',
'PowerLawTemporalModel',
'ScaleSpectralModel',
'Shell2SpatialModel',
'ShellSpatialModel',
'SineTemporalModel',
'SmoothBrokenPowerLawSpectralModel',
'PiecewiseNormSpectralModel',
'ExpCutoffPowerLawSpectralModel',
'ExpCutoffPowerLawNormSpectralModel',
'ExpCutoffPowerLaw3FGLSpectralModel',
'SpatialModel',
'SpectralModel',
'SuperExpCutoffPowerLaw3FGLSpectralModel',
'SuperExpCutoffPowerLaw4FGLSpectralModel',
'LogParabolaSpectralModel',
'LogParabolaNormSpectralModel',
'TemplateSpatialModel',
'TemplateSpectralModel',
'ScaleSpectralModel',
'EBLAbsorptionNormSpectralModel',
'NaimaSpectralModel',
'GaussianSpectralModel',
# spectral_cosmic_ray
'TemporalModel',
'create_cosmic_ray_spectral_model',
# spectral_crab
'MeyerCrabSpectralModel',
'create_crab_spectral_model',
# temporal
'TemporalModel',
'ConstantTemporalModel',
'LinearTemporalModel',
'ExpDecayTemporalModel',
'GaussianTemporalModel',
'LightCurveTemplateTemporalModel',
'PowerLawTemporalModel',
'SineTemporalModel',
# here
"MODEL_REGISTRY",
"SPATIAL_MODEL_REGISTRY",
"TEMPORAL_MODEL_REGISTRY",
"SPECTRAL_MODEL_REGISTRY",
'integrate_spectrum',
'scale_plot_flux',
]


Expand Down Expand Up @@ -191,8 +183,3 @@

MODEL_REGISTRY = Registry([SkyModel, FoVBackgroundModel, TemplateNPredModel])
"""Registry of model classes"""


__all__.extend(cls.__name__ for cls in SPATIAL_MODEL_REGISTRY)
__all__.extend(cls.__name__ for cls in SPECTRAL_MODEL_REGISTRY)
__all__.extend(cls.__name__ for cls in TEMPORAL_MODEL_REGISTRY)
10 changes: 5 additions & 5 deletions gammapy/stats/__init__.py
Expand Up @@ -15,14 +15,14 @@
)

__all__ = [
"WStatCountsStatistic",
"CashCountsStatistic",
"WStatCountsStatistic",
"cash",
"cash_sum_cython",
"cstat",
"wstat",
"get_wstat_mu_bkg",
"f_cash_root_cython",
"get_wstat_gof_terms",
"get_wstat_mu_bkg",
"norm_bounds_cython",
"cash_sum_cython",
"f_cash_root_cython",
"wstat",
]

0 comments on commit 0928239

Please sign in to comment.