Skip to content

Commit ec2160f

Browse files
committed
working on timestamps, unfinished testing
1 parent 4734fea commit ec2160f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/sed/loader/cfel/dataframe.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,11 @@ def df_timestamp(self) -> pd.DataFrame:
156156
timestamps = [ts_start + pd.Timedelta(seconds=cum_exp) for cum_exp in cumulative_exposure]
157157
# add initial timestamp to the start of the list
158158
timestamps.insert(0, ts_start)
159+
160+
timestamps = [(ts - pd.Timestamp("1970-01-01")) // pd.Timedelta("1s") for ts in timestamps]
159161
# Create a DataFrame with the timestamps
160162
ts_alias = self._config["columns"].get("timestamp")
161163
df = pd.DataFrame({ts_alias: timestamps}, index=self.index)
162-
163164
return df
164165

165166
def validate_channel_keys(self) -> None:

tests/loader/cfel/test_get_elapsed

Whitespace-only changes.

0 commit comments

Comments
 (0)