Closed d-chambers closed 5 years ago
What do you guys think @sboltz and @sgjholt ?
I think that makes sense. I definitely like the parallel to the Trace.stats attribute.
I second this, it will make it easier for us to use in the long run too. I guess if it ain't broke don't fix it!
ok @sboltz (and maybe @sgjholt, depending on what you are working on) let me know when any work you are doing that would be affected by this refactor is merged into master then I will do it before it becomes you start something else.
@d-chambers, I think I am okay on my end for you to do the refactor.
@d-chambers this doesn't affect me at all right now, still working at the lowest level. My next task will be to create the SpectrumGroup.fit_source()
as mentioned in https://github.com/seismopy/mopy/issues/1. The refactor will be done before I get to this I'm sure!
I believe that
ChannelInfo
should be renamed toStatsGroup
and that we should think of it as a group ofTrace.Stats
-like objects (but it can be much more too!). This has a few implications:Where there is overlap, we should make sure
StatsGroup
's columns have the same names asTrace.Stats
. For example, the parameters defining the start/stop of windows should be "starttime" and "endtime" rather than "tw_start", "tw_stop" or the like.We should add a method to init a stats group from a
Stream
object by simply harvesting the stats objects of the traces contained therein.The attribute of
TraceGroup
andSpectrumGroup
that accesses theStatsGroup
dataframe should simply be "stats" and to access the attached actualStatsGroup
object should be either_stats_group
orstats_group
. All processing info can then just be tracked on theStatsGroup
object.