Skip to content

Commit

Permalink
Initial commit of AdlerData class.
Browse files Browse the repository at this point in the history
  • Loading branch information
astronomerritt committed Mar 5, 2024
1 parent 1b9e784 commit 9a3cfaf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/adler/dataclasses/AdlerData.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from dataclasses import dataclass, field
import numpy as np


@dataclass
class AdlerData:
"""
Class for storing Adler-calculated values.
Note that for all per-filter attributes, the type is an array in order u, g, r, i, z, y.
"""

phaseAngle_min_adler: field(default_factory=np.zeros(6))
phaseAngle_range_adler: field(default_factory=np.zeros(6))
nobs_adler: field(default_factory=np.zeros(6))
arc_adler: field(default_factory=np.zeros(6))
H_P16_adler: field(default_factory=np.zeros(6))
G12_P16_adler: field(default_factory=np.zeros(6))
HErr_P16_adler: field(default_factory=np.zeros(6))
G12Err_P16_adler: field(default_factory=np.zeros(6))
4 changes: 4 additions & 0 deletions src/adler/dataclasses/AdlerPlanetoid.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from adler.dataclasses.DataSchema import Observations, MPCORB, SSObject
from adler.dataclasses.AdlerData import AdlerData
from adler.science.DummyScience import DummyScience


Expand All @@ -23,6 +24,9 @@ def __init__(self, ssObjectId, population_location="RSP", sql_filename=None):
self.sql_filename = sql_filename
# can also include date ranges at some point

# create empty AdlerData dataclass object
self.AdlerData = AdlerData()

# this creates the AdlerPlanetoid.Observations, AdlerPlanetoid.MPCORB and
# AdlerPlanetoid.SSObject objects.
self.populate_observations()
Expand Down

0 comments on commit 9a3cfaf

Please sign in to comment.