Skip to content

Commit

Permalink
STY: move functions to preprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
jklenzing committed May 6, 2021
1 parent 3608dbf commit cc03313
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions pysatMissions/instruments/pysat_ephem.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,31 @@ def init(self):
"""

self.custom_attach(mm_magcoord.add_quasi_dipole_coordinates)
self.custom_attach(mm_magcoord.add_aacgm_coordinates)
self.custom_attach(mm_sc.calculate_ecef_velocity)
self.custom_attach(mm_sc.add_ram_pointing_sc_attitude_vectors)
self.acknowledgements = ' '.join((
'The project uses the pyephem library available at',
'https://github.com/brandon-rhodes/pyephem'))
self.references = ''
self.references = 'Please contact the pyephem project for references'
logger.info(self.acknowledgements)

return


def preprocess(self):
"""
Add modeled magnetic field values and attitude vectors to spacecraft
Runs after load is invoked.
"""

mm_magcoord.add_quasi_dipole_coordinates(self)
mm_magcoord.add_aacgm_coordinates(self)
mm_sc.calculate_ecef_velocity(self)
mm_sc.add_ram_pointing_sc_attitude_vectors(self)

return


# Clean method
clean = mcore._clean

Expand Down

0 comments on commit cc03313

Please sign in to comment.