Skip to content

Commit

Permalink
Add mode module to docs API. Move COSILike init decription to the top…
Browse files Browse the repository at this point in the history
… so it can be find by sphinx
  • Loading branch information
israelmcmc committed Jan 23, 2024
1 parent 12cd14b commit 30f3f96
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 26 deletions.
51 changes: 25 additions & 26 deletions cosipy/threeml/COSILike.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,31 @@
logger = logging.getLogger(__name__)

class COSILike(PluginPrototype):

def __init__(self, name, dr, data, bkg, sc_orientation, nuisance_param=None, coordsys=None, **kwargs):

"""
COSI 3ML plugin
Parameters
----------
name : str
Plugin name e.g. "cosi". Needs to have a distinct name with respect to other plugins in the same analysis
dr : Path
Path to full detector response
data: histpy.Histogram
Binned data. Note: Eventually this should be a cosipy data class
bkg: histpy.Histogram
Binned background model. Note: Eventually this should be a cosipy data class
sc_orientation: cosipy.spacecraftfile.SpacecraftFile
Contains the information of the orientation: timestamps (astropy.Time) and attitudes (scoord.Attitude) that describe
the spacecraft for the duration of the data included in the analysis
nuisance_param: astromodels.core.parameter.Parameter
Background parameter (optional)
coordsys: str
Coordinate system ('galactic' or 'spacecraftframe') to perform fit in, which should match coordinate system of data
and background. This only needs to be specified if the binned data and background do not have a coordinate system
attached to them
"""
"""
COSI 3ML plugin
Parameters
----------
name : str
Plugin name e.g. "cosi". Needs to have a distinct name with respect to other plugins in the same analysis
dr : Path
Path to full detector response
data: histpy.Histogram
Binned data. Note: Eventually this should be a cosipy data class
bkg: histpy.Histogram
Binned background model. Note: Eventually this should be a cosipy data class
sc_orientation: cosipy.spacecraftfile.SpacecraftFile
Contains the information of the orientation: timestamps (astropy.Time) and attitudes (scoord.Attitude) that describe
the spacecraft for the duration of the data included in the analysis
nuisance_param: astromodels.core.parameter.Parameter
Background parameter (optional)
coordsys: str
Coordinate system ('galactic' or 'spacecraftframe') to perform fit in, which should match coordinate system of data
and background. This only needs to be specified if the binned data and background do not have a coordinate system
attached to them
"""

def __init__(self, name, dr, data, bkg, sc_orientation, nuisance_param=None, coordsys=None, **kwargs):

# create the hash for the nuisance parameters. We have none for now.
self._nuisance_parameters = collections.OrderedDict()
Expand Down
11 changes: 11 additions & 0 deletions docs/api/data_io.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Data IO
=======

Module
------

.. automodule:: cosipy.data_io
:imported-members:
:members:
:undoc-members:

7 changes: 7 additions & 0 deletions docs/api/image_deconvolution.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Image deconvolution
===================

.. automodule:: cosipy.image_deconvolution
:imported-members:
:members:
:undoc-members:
3 changes: 3 additions & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ API

response
coordinates
data_io
threeml
image_deconvolution
10 changes: 10 additions & 0 deletions docs/api/threeml.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
COSILike
========

ThreeML plugin

.. automodule:: cosipy.threeml
:imported-members:
:members:
:undoc-members:

0 comments on commit 30f3f96

Please sign in to comment.