diff --git a/code.json b/code.json index f7ea8ea37a6217fe3282e179291740fc94cad585..2d425280da575c507156903990bfd344f4d3d75d 100644 --- a/code.json +++ b/code.json @@ -3,7 +3,7 @@ "name": "geomag-algorithms", "organization": "U.S. Geological Survey", "description": "Library for processing Geomagnetic timeseries data.", - "version": "1.4.1", + "version": "1.4.2", "status": "Development", "permissions": { @@ -34,7 +34,7 @@ }, "date": { - "metadataLastUpdated": "2021-08-24" + "metadataLastUpdated": "2021-08-26" } } ] diff --git a/geomagio/Controller.py b/geomagio/Controller.py index 2936101a518f57a81155751e885161b2b239bb62..d05f45ae4e8d4848da8e062adddb8540f839e3ef 100644 --- a/geomagio/Controller.py +++ b/geomagio/Controller.py @@ -548,7 +548,7 @@ def get_input_factory(args): input_factory = StreamTimeseriesFactory( factory=input_factory, stream=input_stream ) - return DerivedTimeseriesFactory(input_factory) + return input_factory def get_output_factory(args): @@ -725,6 +725,8 @@ def _main(args): """ # create controller input_factory = get_input_factory(args) + if args.input_derived: + input_factory = DerivedTimeseriesFactory(input_factory) output_factory = get_output_factory(args) algorithm = algorithms[args.algorithm]() algorithm.configure(args) @@ -766,6 +768,12 @@ def parse_args(args): help='Input format (Default "edge")', ) + input_group.add_argument( + "--input-derived", + action="store_true", + default=False, + help="Wrap the input factory in a DerivedTimeseriesFactory", + ) input_group.add_argument( "--input-file", help="Read from specified file", metavar="FILE" ) diff --git a/pyproject.toml b/pyproject.toml index 7849afdf077e3490657e1f5aed8860e98f283e40..a3d76cee9f83cbae8cda869070c42776043e40fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ packages = [ {include = "geomagio" } ] repository="https://code.usgs.gov/ghsc/geomag/geomag-algorithms" -version = "1.4.1" +version = "1.4.2" [tool.poetry.dependencies]