diff --git a/study_lyte/profile.py b/study_lyte/profile.py index ba64d02..531645b 100644 --- a/study_lyte/profile.py +++ b/study_lyte/profile.py @@ -69,13 +69,21 @@ def __init__(self, filename, surface_detection_offset=4.5, calibration=None, self._error = None self._ground = None - def assign_event_depths(self): """" Enable depth assignment post depth realization """ self.events for event in [self._start, self._stop, self._surface.nir, self._surface.force]: event.depth = self.depth.iloc[event.index] + @classmethod + def from_metadata(cls, filename, **kwargs): + profile = cls(filename) + if 'APP VERSION' in profile.metadata.keys(): + return ProcessedProfileV6(filename) + else: + return LyteProfileV6(filename) + + @property def raw(self): """