Git Product home page Git Product logo

test_mirisim_coron_headers's Introduction

test_mirisim_coron_headers

schema_folder contains definitions for all the expected metadata keywords and values in the JWST data. They are available for inspection and/or download from the JWST keyword dictionary here: https://mast.stsci.edu/portal/Mashup/Clients/jwkeywords/. This module and notebook collects all the metadata that is expected to be in the MIRI coronagraphic mode data, and checks it against MIRISim output data.

Usage

Copy the file files_to_test-example.txt to a new file (suggestion: files_to_test.txt) and paste a list of the files you want to test into it, one file per line. Make sure this file is passed as the argument to tmck.read_files at the top of test_data-headers.ipynb. then run the notebook and look at the output!

Tests

Right now the notebook works by printing out information for the user, and it is up to the user to decide if the information is correct or not.

Tests for existence

This test is simply to see if an expected keyword is present or not in the MIRISim headers. It turns out that of the ~300 keywords that are listed in the JWST keyword dictionary as being included in MIRISim coronagraphy data, fewer than 100 of them are used by MIRISim.

For each header, the test function will print a list of expected keywords that were found, and a list of expected keywords that were not found.

Tests for keywords that must have one value from an enumerated list

Some of the keywords must have one value out of a small set. For example, CORONMSK must take one of the following values: LYOT, LYOT_2300, 4QPM, 4QPM_1065, 4QPM_1140, 4QPM_1550. This test checks that each of these kinds of keywords is assigned one of its allowed values. It will print all the keywords that pass the test, and for all the keywords that fail the test, it will print both the bad value and the list of allowed values.

Tests for type

This is a less specific test, which checks only that the type of the value assigned to a particular keyword matches what is specified in the JWST keyword dictionary. For the keywords that fail this test, it will print their name, specified type, and assigned value.

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.