MOMA Python Packages

From 699wiki
Jump to navigation Jump to search

This page lists useful Python (and some shell) scripts that facilitate data extraction and analysis, and links to install packages containing these scripts. A more detailed description of library capabilities can be found here.

To determine which version of 699util you have installed, you can type pip list in your terminal.

Installation Instructions

For installation instructions, go to the Python Tool Installation page, or contact MOMA software developer.

If you already have a package installed and just want to upgrade to a new package, you can:

  • download the latest DMG file from this page
  • double click the DMG file to mount it
  • Open a terminal
  • type cd /Volumes/699util_Installer
  • type ./
  • restart your terminal.

List of Scripts

Script Name Description count the number of APV operations count ions against the multipliers determine how long EMs were on report actual vs. expected housekeeping values stream HKID 928 (the 1 KHz RSIM current) data to a file (this HKID is too dense for count filament cycles performs various ion counting calculations for MOMA scans count laser pulses print errors for missing science data returns the amount of time the WRP was on for the telemetry file run various consumable scripts determine how long filaments were on plot voltage vs. ion counts print a table of packet types and number of occurrences plot the instrument’s data rate from the Rover’s perspective print metamarkers that apply to the file count PWM cycles sync new lab data to SVN print t0 for various time systems output science scans in MZML format output a JSON file summarizing TID data output housekeeping values print markers in the tmfile print the message log plot housekeeping data check the packet sequence numbers and report anomalies print a summary of each packet in the telemetry file determine how long valve 2 was open count the number of valve cycles across a range of TIDs add or modify the GSE packets at the beginning of telemetry files determine boxcar avaerage of two columns of data calculate the fletcher checksum of files or input from stdin
evref copy an expected value reference file to current directory and run write science data to files filter out ExpectedValue.txt lines for which there are no markers in the tm file creates such that packet 1 is modified to match the cwd parse an INI file and print a specific value make a tm.meta file for a TID apply patch files, and print out the resulting database replay a telemetry file packet by packet
plotref copy a plot reference file to the CWD and execute it what a descriptive name trend APV pressure pulse information in LDI mode output RF monitor values for a given bin execute a command across all (or a range of) TIDs print the time that an HKID went above (or below) a threshold defines convenient functions to jump to TID folders print the amount of time between messages in a message log (or between two occurrences of the same message) generate a hex dump of a telemetry file, separated by packets filter data from a telemetry file to a smaller telemetry file parse and print the telemetry database

What's with all this "c_" stuff?

Scripts that begin with "c_" are actually using MOMA Data Viewer code to examine MOMA telemetry files. In many cases, you can omit the "c_" (for example, by running instead of to instead use the pure-Python version of the script. However, we no longer support the pure-Python telemetry extraction library, so its output will become less reliable as time goes on.

I want to write my own script!

MOMA Python packages will create the directory "${HOME}/custom_699_utils" and add it to your PATH. So, users can write a Python script that uses the MOMA Python telemetry extraction library, stick it in this directory, make it executable, and then use it like any other script. Future package installs will not modify the contents of this directory, so your scripts will persist.

Bug Reports

Please do not report bugs on this wiki. Instead, use the Bugzilla server we have set up for bug tracking and reporting. Once you have set up an account, you may file a bug for the python software at the page for Command-line Utils.



DMG (Mac) Installation Package:

C++ Revision: 4942

Python Revision: 2278

Release Date: 2017-03-16

  • `import c699util` now resolves's shared library dependencies


DMG (Mac) Installation Package:

C++ Revision: 4934

Python Revision: 2274

Release Date: 2017-03-15

  • Added support for new laser decode types
  • Adds new marker_relative_timestamp() method to PythonStyleMomaScan()


DMG (Mac) Installation Package:

C++ Revision: 4693

Python Revision: 2252

Release Date: 2017-01-30

  • Fixed a bug where MAIF datapoint timestamps were incorrect if they had a smaller timestamp than their packet's timestamp.
  • Implemented c699util.get_tmfile()
  • Implemented c699util.get_science_data_cache()


DMG (Mac) Installation Package:

C++ Revision: 4666

Python Revision: 2247

Release Date: 2017-01-24

  • Fixed a bug where the NEXT_MARKER and MARKER end conditions could randomly fail.


DMG (Mac) Installation Package:

C++ Revision: 4608

Python Revision: 2239

Release Date: 2017-01-12

  • Added support for TVAC Status packet (type 42).


DMG (Mac) Installation Package:

C++ Revision: 4592

Python Revision: 2234

Release Date: 2017-01-10

  • now supports temperature dependent values.


DMG (Mac) Installation Package:

C++ Revision: 4592

Python Revision: 2233

Release Date: 2016-12-16

  • Released


DMG (Mac) Installation Package:

C++ Revision: 4592

Python Revision: 2231

Release Date: 2016-12-15

  • Fixed an issue found by Brad where was the wrong name, causing to fail.
  • Included in the package release.


DMG (Mac) Installation Package:

C++ Revision: 4592

Python Revision: 2229

Release Date: 2016-12-15

  • Fixed an issue found by Brad where regular expression matching in the message log (which happens with the new meta marker "message" trigger) wasn't stripping away the timestamp and whitespace before checking for a match.


DMG (Mac) Installation Package:

C++ Revision: 4591

Python Revision: 2227

Release Date: 2016-12-14

  • The "message" trigger now has an offset_in_seconds field
  • The "message" trigger can now be used as an end condition


DMG (Mac) Installation Package:

C++ Revision: 4589

Python Revision: 2222

Release Date: 2016-12-14

  • c699util objects now have docstrings, which are available through the help() function.
  • meta markers are no longer generated when TMFile and Science Caches are constructed, which speeds things up. Now, meta markers are only generated if one of the get_meta_markers() methods is called.
  • implemented "message" meta marker start condition
  • added optional script configuration fields to the "marker" start condition
  • the "marker" and "next_marker" end conditions will now only end a meta marker if the timestamp of the marker packet is greater than or equal to the meta marker's start time


DMG (Mac) Installation Package:

C++ Revision: 4509

Python Revision: 2215

Release Date: 2016-11-15

  • Implemented decode type 230, to support HKID 408 -- SUM PKT TIC


DMG (Mac) Installation Package:

C++ Revision: 4483

Python Revision: 2200

Release Date: 2016-11-04

  • MOMA Python tools are now aware of the metamarkers defined in momagse/MetaMarkerRules.
  • can be used to see what metamarkers apply to a file, and to print highly specific metamarker rule file errors
  • Metamarkers can be used for filtering wherever a normal marker would be used. For example: 811 --mkid 50050
  • bogus SWTS1 and SWTS2 packet timestamps are now corrected


DMG (Mac) Installation Package:

Revision: 2175

Release Date: 2016-10-14

  • Markers are now assigned to packets based on timestamp, rather than packet index. Note that many scripts still extract datapoints from packets, and assume that those datapoints always have the same markers as their parent packets. MOMA marker assignment is a work in progress.


DMG (Mac) Installation Package:

Revision: 2167

Release Date: 2016-10-03

  • This release includes the new MOMA Data View timestamp resolver, which properly handles timestamp resolution when resets occur. Using the same time resolution code for MOMA Data View, Python scripts, and XINA should eliminate time consistency issues.
  • evref output is now sorted first by MKID, and next by HKID


DMG (Mac) Installation Package:

Revision: 2156

Release Date: 2016-08-30

  • Fixed a bug where (c_) didn't have access to (c_)


DMG (Mac) Installation Package:

Revision: 2155

Release Date: 2016-08-30

  • and evref now read XINA exported limits. They are no longer compatible with old limits files.


DMG (Mac) Installation Package:

Revision: 2151

Release Date: 2016-08-22

  • We are now releasing MOMA Python packages.