From 615ee93d550ceb11e334d1f8e3860c88d137a06f Mon Sep 17 00:00:00 2001 From: pcain-usgs <pcain@usgs.gov> Date: Tue, 16 Jun 2020 12:53:02 -0600 Subject: [PATCH] merge commands, remove time adjustments, merge commands --- geomagio/processing/magproc.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/geomagio/processing/magproc.py b/geomagio/processing/magproc.py index 3b9a33ddd..6d05a68f9 100644 --- a/geomagio/processing/magproc.py +++ b/geomagio/processing/magproc.py @@ -1,4 +1,3 @@ -from os import path import os import sys @@ -64,13 +63,6 @@ def write_cal_file( observatory: str, base_directory: str = "file://c:/Calibrat/", ): - filename = CAL_FILENAME_FORMAT.format(OBSERVATORY=observatory, YEAR=starttime.year) - starttime = starttime + relativedelta(months=-1) - endtime = endtime + relativedelta(months=+2) - starttime = UTCDateTime( - year=starttime.year, month=starttime.month, day=starttime.day - ) - endtime = UTCDateTime(year=endtime.year, month=endtime.month, day=endtime.day) filename = CAL_FILENAME_FORMAT.format(OBSERVATORY=observatory, YEAR=starttime.year) readings = WebAbsolutesFactory().get_readings( observatory=observatory, @@ -110,10 +102,8 @@ def write_pcdcp_file( template: str = PCDCP_FILE_PATTERN, ): raw_factory = PCDCPFactory( - urlInterval=86400, urlTemplate=base_directory + f"{template}", - ) - - raw_factory.put_timeseries( + urlInterval=86400, urlTemplate=base_directory + template, + ).put_timeseries( timeseries=timeseries, starttime=starttime, endtime=endtime, -- GitLab