Giter Site home page Giter Site logo

oem's People

Contributors

bradsease avatar josephgruber avatar tommasopino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

oem's Issues

OEM object not constrained

Per the specification, an OEM may only contain one object, even though each metadata field has its own OBJECT_NAME and OBJECT_ID entry. Constrain these fields to be consistent across all segments.

From section 5.1.3 of the specification:

The OEM shall be a plain text file consisting of orbit data for a single object.

YYYY-DDD epoch format not supported

Dates can be represented in two ways in an OEM (spec):

YYYY-MM-DDThh:mm:ss[.dā†’d][Z]

or

YYYY-DDDThh:mm:ss[.dā†’d][Z]

The oem package currently only supports the first format. Add support for this epoch format.

Metadata.py: please check if required standard keyword string typo "USEABLE..." -> "USABLE..."

Describe the bug
Using an existing OEM file the string (header key) "USABLE_START_TIME" was found to be invalid: an error on that string was raised. Apparently all corresponding keys found in the metadata.py module to contain a typo ("USEABLE_...") need to be corrected to "USABLE_..."; a performed test (changing key in metadata.py) was resulting in the code to successfully accept the corrected key.

Steps to Reproduce

  • introduce test header items "USABLE_START_TIME" (and USABLE_STOP_TIME) plus a suited/valid value into any OEM sample file;
  • check for error messaging;
# Insert reproducing code snippet here

#
# not needed, please see description of the proposed reproduction steps
#

**Python/Package Version Information**
Python: v3.9.5
oem: v0.3.3

Importing OEM data message with long trajectory crashes due to unbounded memory usage of Regex

Describe the bug
When importing an OEM file in KVN format with a size of 450 MB which contains about 7 years of trajectory data the regex match statement in _from_kvm_oem() immediately hogs > 16GB RAM and gets killed. Maybe a transition to a slower, but more stable state machine processing line by line as in https://gitlab.com/jorispio/ccsds2czml. Although the parsing algorithm there is also behaving poorly with multiple segments.

I've tried to use google/re2 python wrappers for a more efficient processing of the file, but still fails.
I'll take a look on rewriting the parser.

Edit: only the match() call seems to create issues, find_all() and running the match for the header section separately works fine.

Numpy warning when interpolating ephemerides

This warning appears when interpolating OEMs:

__main__:1: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.

The sources are np.vstack calls with generators on lines 103 and 122 of oem.interp.

Missing line_number in err method call

Describe the bug
In the parse_kvn_oem method, if the CCSDS_OEM_VERS keyword is missing as the first line, the err method is called but is missing the line_number parameter value. This results in a TypeError being thrown.

https://github.com/bradsease/oem/blob/main/oem/parsers.py#L53

PR for fix: #81

Steps to Reproduce
Provide any OEM file that does not have the CCSDS_OEM_VERS keyword as the first line

Python/Package Version Information
Python: [e.g. 3.5.1] 3.11.6
oem: [e.g. 1.0.0] 0.4.0

Generalize setup.py for local builds

The current setup.py is configured for CI/CD use only and does not properly support local builds. Find a solution that works for both.

Issue noted in PR #69

Sample OEMs do not work with oacmpy

Describe the bug
I've originally came across your samples folder in a google search when looking for other example OEM other than the ones provided in ccsds2czml: https://gitlab.com/jorispio/ccsds2czml/-/tree/master/example

All OEM files in samples/real threw a generic datetime microsecond error, but i could not discern any differences between your OEMs and the sample_OEM generated by ccsds2czml. Their sample_OEM worked fine. Below is the traceback error:

C:\Users\khoohuibo\Desktop\ccsds2czml-master>python -m oacmpy -i LEO_10s.oem -o one_sat.czml -v
Input File : LEO_10s.oem
Output File: one_sat.czml
  File:  LEO_10s.oem
Traceback (most recent call last):
  File "C:\Users\Hubert Khoo\.conda\envs\arcsim\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\Hubert Khoo\.conda\envs\arcsim\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Hubert Khoo\.conda\envs\arcsim\lib\site-packages\oacmpy\__main__.py", line 5, in <module>
    main(sys.argv[1:])
  File "C:\Users\Hubert Khoo\.conda\envs\arcsim\lib\site-packages\oacmpy\oem2czml.py", line 78, in main
    _ccsds2czml(inputfile, outputfile, verbose)
  File "C:\Users\Hubert Khoo\.conda\envs\arcsim\lib\site-packages\oacmpy\oem2czml.py", line 35, in _ccsds2czml
    print(" Simulation time span: {} - {}".format(start, end))
  File "C:\Users\Hubert Khoo\.conda\envs\arcsim\lib\site-packages\oacmpy\datetime\Date.py", line 297, in __str__
    return self.strftime(ISO8601_FORMAT_Z)
  File "C:\Users\Hubert Khoo\.conda\envs\arcsim\lib\site-packages\oacmpy\datetime\Date.py", line 291, in strftime
    return self.datetime.strftime(fmt)
  File "C:\Users\Hubert Khoo\.conda\envs\arcsim\lib\site-packages\oacmpy\datetime\Date.py", line 251, in datetime
    self._datetime = datetime(year=year, month=month, day=day, hour=h, minute=m, second=s, microsecond=ms)
ValueError: microsecond must be in 0..999999

I have attached the sample_object.oem file generated for easier reference
sample_object.zip

Steps to Reproduce

  1. Download both repositories
  2. Run the following code in the root directory of ccsds2czml-master to generate a sample_OEM file
python -m example.single.simple_oem
  1. Generate CZML file using sample_object.oem file generated in root directory of ccsds2czml-master, using the code below
python -m oacmpy -i sample_object.oem -o one_sat.czml -v
  1. Visualize using Cesium Viewer
  2. Attempt to generate CZML file by using OEM file from oem-master/samples/real, (Used LEO_10s and GEO_20s)
  3. Obtain traceback error as described
# Insert reproducing code snippet here

Python/Package Version Information
Python: [e.g. 3.5.1]
oem: [e.g. 1.0.0]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.