Skip to content

Commit

Permalink
Merge pull request #153 from ckarwin/main
Browse files Browse the repository at this point in the history
Fixed bugs in doc strings
  • Loading branch information
israelmcmc authored Mar 12, 2024
2 parents e65074b + f0f2f82 commit 815376b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 35 deletions.
24 changes: 11 additions & 13 deletions cosipy/data_io/ReadTraTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ def read_tra_old(self,make_plots=True):

"""Reads in MEGAlib .tra (or .tra.gz) file.
Extended Summary
----------------
This method uses MEGAlib to read events from the tra file.
This is used to compare to the new event reader, which is
independent of MEGAlib.
Expand All @@ -41,17 +39,17 @@ def read_tra_old(self,make_plots=True):
-------
cosi_dataset : dict
Returns COSI dataset as a dictionary of the form:
cosi_dataset = {'Full filename':self.data_file,
'Energies':erg,
'TimeTags':tt,
'Xpointings':np.array([lonX,latX]).T,
'Ypointings':np.array([lonY,latY]).T,
'Zpointings':np.array([lonZ,latZ]).T,
'Phi':phi,
'Chi local':chi_loc,
'Psi local':psi_loc,
'Distance':dist,
'Chi galactic':chi_gal,
cosi_dataset = {'Full filename':self.data_file,\
'Energies':erg,\
'TimeTags':tt,\
'Xpointings':np.array([lonX,latX]).T,\
'Ypointings':np.array([lonY,latY]).T,\
'Zpointings':np.array([lonZ,latZ]).T,\
'Phi':phi,\
'Chi local':chi_loc,\
'Psi local':psi_loc,\
'Distance':dist,\
'Chi galactic':chi_gal,\
'Psi galactic':psi_gal}
Note
Expand Down
40 changes: 19 additions & 21 deletions cosipy/data_io/UnBinnedData.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,27 @@ def read_tra(self, output_name=None, run_test=False, use_ori=False,
cosi_dataset, dict
The returned dictionary contains the COSI dataset, which
has the form:
cosi_dataset = {'Energies':erg,
'TimeTags':tt,
'Xpointings':np.array([lonX,latX]).T,
'Ypointings':np.array([lonY,latY]).T,
'Zpointings':np.array([lonZ,latZ]).T,
'Phi':phi,
'Chi local':chi_loc,
'Psi local':psi_loc,
'Distance':dist,
'Chi galactic':chi_gal,
'Psi galactic':psi_gal}
Arrays contain unbinned photon data.
cosi_dataset = {'Energies':erg,\
'TimeTags':tt,\
'Xpointings':np.array([lonX,latX]).T,\
'Ypointings':np.array([lonY,latY]).T,\
'Zpointings':np.array([lonZ,latZ]).T,\
'Phi':phi,\
'Chi local':chi_loc,\
'Psi local':psi_loc,\
'Distance':dist,\
'Chi galactic':chi_gal,\
'Psi galactic':psi_gal}\
Arrays contain unbinned photon data.
Notes
-----
The current code is only able to handle data with Compton
events. It will need to be modified to handle single-site
and pair events.
The current code is only able to handle data with Compton
events. It will need to be modified to handle single-site
and pair events.
This method sets the instance attribute, cosi_dataset,
but it does not explicitly return this.
This method sets the instance attribute, cosi_dataset,
but it does not explicitly return this.
"""

start_time = time.time()
Expand Down Expand Up @@ -376,8 +376,6 @@ def instrument_pointing(self):

"""Get pointing information from ori file.
Extended Summary
---------------
Initializes interpolated functions for lonx, latx, lonz, latz
in radians.
Expand Down Expand Up @@ -555,8 +553,8 @@ def get_dict_from_hdf5(self, input_hdf5):

"""Constructs dictionary from input hdf5 file
Parameter
---------
Parameters
----------
input_hdf5 : str
Name of input hdf5 file.
Expand Down
2 changes: 1 addition & 1 deletion cosipy/spacecraftfile/SpacecraftFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def get_scatt_map(self,
"""
Bin the spacecraft attitude history into a 4D histogram that contains the accumulated time the axes of the spacecraft where looking at a given direction.
Paremeters
Parameters
----------
nside : int
The nside of the scatt map.
Expand Down

0 comments on commit 815376b

Please sign in to comment.