From 57d97fc0c7aea18c72af1e4202e6e5e59f551ea2 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Thu, 3 Dec 2026 12:48:31 -0800 Subject: [PATCH 1/7] stcschan: read a time sub-phrase that starts with Time In ReadProps the assignment "timeid = TIME_ID;" sat inside the comment of the line before it, so a time sub-phrase starting with the identifier "Time" left timeid unset and the read crashed. The assignment is now code. The STC-S corpus document time-identifier reaches it. Generated with AI Co-Authored-By: SLAC AI --- newsfragments/+stcs-corpus.serialisation | 2 ++ src/stcschan.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 newsfragments/+stcs-corpus.serialisation diff --git a/newsfragments/+stcs-corpus.serialisation b/newsfragments/+stcs-corpus.serialisation new file mode 100644 index 00000000..c7dc41f8 --- /dev/null +++ b/newsfragments/+stcs-corpus.serialisation @@ -0,0 +1,2 @@ +astRead on an StcsChan now reads a time sub-phrase that starts with the identifier "Time", such as "Time TT MJD 50000.0". +It used to crash. diff --git a/src/stcschan.c b/src/stcschan.c index 9ff8a2fe..a2fde45b 100644 --- a/src/stcschan.c +++ b/src/stcschan.c @@ -192,6 +192,10 @@ f The StcsChan class does not define any new routines beyond those * GetRegionProps annuls the KeyMap it creates for a negated Region * once it has been stored, which it did not, so every negated Region * written leaked a KeyMap. +* 3-DEC-2026 (TIMJ): +* ReadProps records a time sub-phrase that starts with "Time" as a +* Time sub-phrase. The assignment was inside a comment, so the +* identifier was never set and reading such a sub-phrase crashed. *class-- */ @@ -3713,7 +3717,8 @@ static AstKeyMap *ReadProps( AstStcsChan *this, int *status ) { } else if( astChrMatch( word, "Time" ) ) { look_for = TIME_SCALE; /* After "Time", we move on to find the - timeid = TIME_ID; time-scale, not the fill factor */ + time-scale, not the fill factor */ + timeid = TIME_ID; /* If the word is not a known time sub-phrase identifier, indicate that we should attempt to re-interpret the current word as a space sub-phrase From 665f1823d2e5877741ee8bc1ca4ddfb52445f322 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Thu, 3 Dec 2026 12:48:31 -0800 Subject: [PATCH 2/7] stcschan-demo4, stcschan-demo5: display the warnings Both demonstrations decided whether to display the warnings with "!status", testing the int pointer they are given rather than the value it points to, so the condition was always false and the warnings they describe were never shown. They now test "!*status". Generated with AI Co-Authored-By: SLAC AI --- newsfragments/+stcs-corpus.bugfix | 2 ++ src/stcschan-demo4.c | 8 +++++++- src/stcschan-demo5.c | 8 +++++++- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 newsfragments/+stcs-corpus.bugfix diff --git a/newsfragments/+stcs-corpus.bugfix b/newsfragments/+stcs-corpus.bugfix new file mode 100644 index 00000000..36a6abf9 --- /dev/null +++ b/newsfragments/+stcs-corpus.bugfix @@ -0,0 +1,2 @@ +The stcschan-demo4 and stcschan-demo5 example programs now display the warnings issued while reading or writing an STC-S description, as their comments describe. +They tested the address of their status variable rather than its value, so the warnings were never shown. diff --git a/src/stcschan-demo4.c b/src/stcschan-demo4.c index e45035ff..ff21a983 100644 --- a/src/stcschan-demo4.c +++ b/src/stcschan-demo4.c @@ -29,6 +29,12 @@ % gcc -o stcschan-demo4 stcschan-demo4.c -L/star/lib \ -I/star/include `ast_link` + + History: + 3-DEC-2026 (TIMJ): + Test the value of the status argument rather than the pointer + when deciding whether to display the warnings, which were never + displayed. */ /* Include system headers. */ @@ -235,7 +241,7 @@ AstRegion *ReadStcs( AstStcsChan *chan, const char *file, int *status ){ /* If any warnings were generated, and if no other error has occurred so far, display the warnings. */ - if( warnings && !status && astOK ) { + if( warnings && !*status && astOK ) { printf( "\nThe following warnings were issued reading file " "'%s':\n", file ); diff --git a/src/stcschan-demo5.c b/src/stcschan-demo5.c index 787c9e69..0d5da594 100644 --- a/src/stcschan-demo5.c +++ b/src/stcschan-demo5.c @@ -29,6 +29,12 @@ % gcc -o stcschan-demo5 stcschan-demo5.c -L/star/lib \ -I/star/include `ast_link` + + History: + 3-DEC-2026 (TIMJ): + Test the value of the status argument rather than the pointer + when deciding whether to display the warnings, which were never + displayed. */ /* Include system headers. */ @@ -267,7 +273,7 @@ void ReportWarnings( AstStcsChan *chan, const char *file, int *status ){ /* If any warnings were generated, and if no other error has occurred so far, display the warnings. */ - if( warnings && !status && astOK ) { + if( warnings && !*status && astOK ) { /* Indicate the context to the user. Assume we were reading an STC-S description if "file" was supplied, and writing an STC-S desciprion From f4957c342b885749d30b491e80fa6281911e030e Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Thu, 3 Dec 2026 12:48:32 -0800 Subject: [PATCH 3/7] ast_tester: check the STC-S corpus shared with the Rust port fixtures/stcs holds STC-S documents with the error, Native dumps, warnings and written STC-S that each gives, captured on Linux x86_64 and shared byte for byte with the Rust port of AST. check_stcs_corpus checks one document against them, and CMake registers a stcs_corpus_ ctest for each row of corpus.txt. The texts are compared byte for byte on Linux x86_64 and by compare_dumps.c's rule, which the program includes, elsewhere. The two documents that behave differently, timeinterval-allsky (writes nothing) and position (its written text does not read back), are listed with the reason and checked for still doing so. teststcschan compared the PROPS KeyMap of its third document with stcschan-test1-doc3-props.ast through astEqual, which compares only the class of two KeyMaps, so the fixture had drifted from what astRead returns. It now compares the dump text, and the fixture is regenerated from the library's output. fixtures/programs/stcschan-demos holds the inputs the Rust port's versions of the stcschan demonstrations are run on. Generated with AI Co-Authored-By: SLAC AI --- PLAN.md | 27 + ast_tester/CMakeLists.txt | 40 + ast_tester/check_stcs_corpus.c | 712 +++++++++ ast_tester/fixtures/DIST_MANIFEST | 4 + ast_tester/fixtures/oracle/headers.oracle | 53 + .../stcschan-demos/stcs-ex1-field.head | 16 + .../programs/stcschan-demos/stcs-ex1.txt | 13 + .../programs/stcschan-demos/stcs-ex2.txt | 13 + .../stcschan-test1-doc3-props.ast | 226 ++- ast_tester/fixtures/stcs/README.md | 71 + .../fixtures/stcs/adass2010-figure1-nobox.moc | 132 ++ .../stcs/adass2010-figure1-nobox.native | 724 +++++++++ .../fixtures/stcs/adass2010-figure1-nobox.out | 1 + .../stcs/adass2010-figure1-nobox.out-20 | 20 + .../stcs/adass2010-figure1-nobox.props.native | 198 +++ .../stcs/adass2010-figure1-nobox.stcs | 12 + .../stcs/adass2010-figure1-nobox.warnings | 1 + .../fixtures/stcs/adass2010-figure1.native | 849 ++++++++++ .../fixtures/stcs/adass2010-figure1.out | 1 + .../fixtures/stcs/adass2010-figure1.out-20 | 29 + .../stcs/adass2010-figure1.out-indent | 16 + .../stcs/adass2010-figure1.props.native | 225 +++ .../fixtures/stcs/adass2010-figure1.stcs | 13 + .../fixtures/stcs/adass2010-figure1.warnings | 1 + .../fixtures/stcs/allsky-fillfactor.moc | 2 + .../fixtures/stcs/allsky-fillfactor.native | 74 + .../fixtures/stcs/allsky-fillfactor.out | 1 + .../fixtures/stcs/allsky-fillfactor.out-20 | 3 + .../stcs/allsky-fillfactor.props.native | 21 + .../fixtures/stcs/allsky-fillfactor.stcs | 1 + .../fixtures/stcs/allsky-fillfactor.warnings | 1 + ast_tester/fixtures/stcs/allsky.moc | 2 + ast_tester/fixtures/stcs/allsky.native | 70 + ast_tester/fixtures/stcs/allsky.out | 1 + ast_tester/fixtures/stcs/allsky.out-20 | 2 + ast_tester/fixtures/stcs/allsky.props.native | 18 + ast_tester/fixtures/stcs/allsky.stcs | 1 + ast_tester/fixtures/stcs/allsky.warnings | 1 + ast_tester/fixtures/stcs/circle-arcsec.native | 91 ++ ast_tester/fixtures/stcs/circle-arcsec.out | 1 + ast_tester/fixtures/stcs/circle-arcsec.out-20 | 3 + .../fixtures/stcs/circle-arcsec.props.native | 32 + ast_tester/fixtures/stcs/circle-arcsec.stcs | 1 + .../fixtures/stcs/circle-arcsec.warnings | 1 + ast_tester/fixtures/stcs/circle-unit-m.error | 2 + ast_tester/fixtures/stcs/circle-unit-m.stcs | 1 + .../fixtures/stcs/compound-union.native | 849 ++++++++++ ast_tester/fixtures/stcs/compound-union.out | 1 + .../fixtures/stcs/compound-union.out-20 | 30 + .../fixtures/stcs/compound-union.props.native | 225 +++ ast_tester/fixtures/stcs/compound-union.stcs | 13 + .../fixtures/stcs/compound-union.warnings | 0 .../fixtures/stcs/compound-with-time.moc | 147 ++ .../fixtures/stcs/compound-with-time.native | 1387 +++++++++++++++++ .../fixtures/stcs/compound-with-time.out | 1 + .../fixtures/stcs/compound-with-time.out-20 | 42 + .../stcs/compound-with-time.props.native | 359 +++++ .../fixtures/stcs/compound-with-time.stcs | 24 + .../fixtures/stcs/compound-with-time.warnings | 2 + ast_tester/fixtures/stcs/convex.error | 2 + ast_tester/fixtures/stcs/convex.stcs | 1 + ast_tester/fixtures/stcs/corpus.txt | 35 + ast_tester/fixtures/stcs/ellipse.moc | 11 + ast_tester/fixtures/stcs/ellipse.native | 96 ++ ast_tester/fixtures/stcs/ellipse.out | 1 + ast_tester/fixtures/stcs/ellipse.out-20 | 3 + ast_tester/fixtures/stcs/ellipse.props.native | 35 + ast_tester/fixtures/stcs/ellipse.stcs | 1 + ast_tester/fixtures/stcs/ellipse.warnings | 1 + .../fixtures/stcs/fred-unknown-word.error | 2 + .../fixtures/stcs/fred-unknown-word.stcs | 2 + ast_tester/fixtures/stcs/misspelt-keyword.moc | 8 + .../fixtures/stcs/misspelt-keyword.native | 273 ++++ ast_tester/fixtures/stcs/misspelt-keyword.out | 1 + .../fixtures/stcs/misspelt-keyword.out-20 | 10 + .../stcs/misspelt-keyword.props.native | 64 + .../fixtures/stcs/misspelt-keyword.stcs | 2 + .../fixtures/stcs/misspelt-keyword.warnings | 4 + .../nested-intersection-difference.native | 357 +++++ .../stcs/nested-intersection-difference.out | 1 + .../nested-intersection-difference.out-20 | 12 + ...ested-intersection-difference.props.native | 106 ++ .../stcs/nested-intersection-difference.stcs | 7 + .../nested-intersection-difference.warnings | 1 + ast_tester/fixtures/stcs/not.moc | 19 + ast_tester/fixtures/stcs/not.native | 103 ++ ast_tester/fixtures/stcs/not.out | 1 + ast_tester/fixtures/stcs/not.out-20 | 3 + ast_tester/fixtures/stcs/not.props.native | 43 + ast_tester/fixtures/stcs/not.stcs | 1 + ast_tester/fixtures/stcs/not.warnings | 1 + ast_tester/fixtures/stcs/polygon.moc | 23 + ast_tester/fixtures/stcs/polygon.native | 96 ++ ast_tester/fixtures/stcs/polygon.out | 1 + ast_tester/fixtures/stcs/polygon.out-20 | 3 + ast_tester/fixtures/stcs/polygon.props.native | 32 + ast_tester/fixtures/stcs/polygon.stcs | 1 + ast_tester/fixtures/stcs/polygon.warnings | 1 + .../stcs/position-interval-fillfactor.moc | 29 + .../stcs/position-interval-fillfactor.native | 100 ++ .../stcs/position-interval-fillfactor.out | 1 + .../stcs/position-interval-fillfactor.out-20 | 4 + .../position-interval-fillfactor.props.native | 40 + .../stcs/position-interval-fillfactor.stcs | 1 + .../position-interval-fillfactor.warnings | 1 + .../stcs/position-interval-unit-m.error | 2 + .../stcs/position-interval-unit-m.stcs | 1 + .../fixtures/stcs/position-interval.moc | 29 + .../fixtures/stcs/position-interval.native | 93 ++ .../fixtures/stcs/position-interval.out | 1 + .../fixtures/stcs/position-interval.out-20 | 3 + .../stcs/position-interval.props.native | 34 + .../fixtures/stcs/position-interval.stcs | 1 + .../fixtures/stcs/position-interval.warnings | 1 + ast_tester/fixtures/stcs/position.native | 133 ++ ast_tester/fixtures/stcs/position.out | 1 + ast_tester/fixtures/stcs/position.out-20 | 3 + .../fixtures/stcs/position.props.native | 26 + ast_tester/fixtures/stcs/position.stcs | 1 + ast_tester/fixtures/stcs/position.warnings | 1 + .../fixtures/stcs/redshift-interval.native | 76 + .../fixtures/stcs/redshift-interval.out | 1 + .../fixtures/stcs/redshift-interval.out-20 | 4 + .../stcs/redshift-interval.props.native | 29 + .../fixtures/stcs/redshift-interval.stcs | 1 + .../fixtures/stcs/redshift-interval.warnings | 0 .../fixtures/stcs/spectral-interval.native | 70 + .../fixtures/stcs/spectral-interval.out | 1 + .../fixtures/stcs/spectral-interval.out-20 | 4 + .../stcs/spectral-interval.props.native | 23 + .../fixtures/stcs/spectral-interval.stcs | 1 + .../fixtures/stcs/spectral-interval.warnings | 1 + ast_tester/fixtures/stcs/stcs-ex1.moc | 2 + ast_tester/fixtures/stcs/stcs-ex1.native | 899 +++++++++++ ast_tester/fixtures/stcs/stcs-ex1.out | 1 + ast_tester/fixtures/stcs/stcs-ex1.out-20 | 29 + .../fixtures/stcs/stcs-ex1.props.native | 193 +++ ast_tester/fixtures/stcs/stcs-ex1.stcs | 13 + ast_tester/fixtures/stcs/stcs-ex1.warnings | 2 + .../fixtures/stcs/time-identifier.native | 67 + ast_tester/fixtures/stcs/time-identifier.out | 1 + .../fixtures/stcs/time-identifier.out-20 | 2 + .../stcs/time-identifier.props.native | 23 + ast_tester/fixtures/stcs/time-identifier.stcs | 1 + .../fixtures/stcs/time-identifier.warnings | 1 + ast_tester/fixtures/stcs/time-spectral.native | 381 +++++ ast_tester/fixtures/stcs/time-spectral.out | 1 + ast_tester/fixtures/stcs/time-spectral.out-20 | 11 + .../fixtures/stcs/time-spectral.props.native | 85 + ast_tester/fixtures/stcs/time-spectral.stcs | 6 + .../fixtures/stcs/time-spectral.warnings | 1 + .../fixtures/stcs/timeinterval-allsky.moc | 2 + .../fixtures/stcs/timeinterval-allsky.native | 115 ++ .../fixtures/stcs/timeinterval-allsky.out | 0 .../fixtures/stcs/timeinterval-allsky.out-20 | 0 .../stcs/timeinterval-allsky.props.native | 43 + .../fixtures/stcs/timeinterval-allsky.stcs | 1 + .../stcs/timeinterval-allsky.warnings | 2 + ast_tester/fixtures/stcs/two-axis-box.moc | 29 + ast_tester/fixtures/stcs/two-axis-box.native | 96 ++ ast_tester/fixtures/stcs/two-axis-box.out | 1 + ast_tester/fixtures/stcs/two-axis-box.out-20 | 3 + .../fixtures/stcs/two-axis-box.props.native | 37 + ast_tester/fixtures/stcs/two-axis-box.stcs | 1 + .../fixtures/stcs/two-axis-box.warnings | 0 ast_tester/fixtures/stcs/union-allsky.moc | 2 + ast_tester/fixtures/stcs/union-allsky.native | 106 ++ ast_tester/fixtures/stcs/union-allsky.out | 1 + ast_tester/fixtures/stcs/union-allsky.out-20 | 2 + .../fixtures/stcs/union-allsky.props.native | 54 + ast_tester/fixtures/stcs/union-allsky.stcs | 1 + .../fixtures/stcs/union-allsky.warnings | 1 + ast_tester/teststcschan.c | 69 +- newsfragments/+stcs-corpus.build | 1 + 174 files changed, 11088 insertions(+), 86 deletions(-) create mode 100644 ast_tester/check_stcs_corpus.c create mode 100644 ast_tester/fixtures/programs/stcschan-demos/stcs-ex1-field.head create mode 100644 ast_tester/fixtures/programs/stcschan-demos/stcs-ex1.txt create mode 100644 ast_tester/fixtures/programs/stcschan-demos/stcs-ex2.txt create mode 100644 ast_tester/fixtures/stcs/README.md create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1-nobox.moc create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1-nobox.native create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1-nobox.out create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1-nobox.out-20 create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1-nobox.props.native create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1-nobox.stcs create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1-nobox.warnings create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1.native create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1.out create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1.out-20 create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1.out-indent create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1.props.native create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1.stcs create mode 100644 ast_tester/fixtures/stcs/adass2010-figure1.warnings create mode 100644 ast_tester/fixtures/stcs/allsky-fillfactor.moc create mode 100644 ast_tester/fixtures/stcs/allsky-fillfactor.native create mode 100644 ast_tester/fixtures/stcs/allsky-fillfactor.out create mode 100644 ast_tester/fixtures/stcs/allsky-fillfactor.out-20 create mode 100644 ast_tester/fixtures/stcs/allsky-fillfactor.props.native create mode 100644 ast_tester/fixtures/stcs/allsky-fillfactor.stcs create mode 100644 ast_tester/fixtures/stcs/allsky-fillfactor.warnings create mode 100644 ast_tester/fixtures/stcs/allsky.moc create mode 100644 ast_tester/fixtures/stcs/allsky.native create mode 100644 ast_tester/fixtures/stcs/allsky.out create mode 100644 ast_tester/fixtures/stcs/allsky.out-20 create mode 100644 ast_tester/fixtures/stcs/allsky.props.native create mode 100644 ast_tester/fixtures/stcs/allsky.stcs create mode 100644 ast_tester/fixtures/stcs/allsky.warnings create mode 100644 ast_tester/fixtures/stcs/circle-arcsec.native create mode 100644 ast_tester/fixtures/stcs/circle-arcsec.out create mode 100644 ast_tester/fixtures/stcs/circle-arcsec.out-20 create mode 100644 ast_tester/fixtures/stcs/circle-arcsec.props.native create mode 100644 ast_tester/fixtures/stcs/circle-arcsec.stcs create mode 100644 ast_tester/fixtures/stcs/circle-arcsec.warnings create mode 100644 ast_tester/fixtures/stcs/circle-unit-m.error create mode 100644 ast_tester/fixtures/stcs/circle-unit-m.stcs create mode 100644 ast_tester/fixtures/stcs/compound-union.native create mode 100644 ast_tester/fixtures/stcs/compound-union.out create mode 100644 ast_tester/fixtures/stcs/compound-union.out-20 create mode 100644 ast_tester/fixtures/stcs/compound-union.props.native create mode 100644 ast_tester/fixtures/stcs/compound-union.stcs create mode 100644 ast_tester/fixtures/stcs/compound-union.warnings create mode 100644 ast_tester/fixtures/stcs/compound-with-time.moc create mode 100644 ast_tester/fixtures/stcs/compound-with-time.native create mode 100644 ast_tester/fixtures/stcs/compound-with-time.out create mode 100644 ast_tester/fixtures/stcs/compound-with-time.out-20 create mode 100644 ast_tester/fixtures/stcs/compound-with-time.props.native create mode 100644 ast_tester/fixtures/stcs/compound-with-time.stcs create mode 100644 ast_tester/fixtures/stcs/compound-with-time.warnings create mode 100644 ast_tester/fixtures/stcs/convex.error create mode 100644 ast_tester/fixtures/stcs/convex.stcs create mode 100644 ast_tester/fixtures/stcs/corpus.txt create mode 100644 ast_tester/fixtures/stcs/ellipse.moc create mode 100644 ast_tester/fixtures/stcs/ellipse.native create mode 100644 ast_tester/fixtures/stcs/ellipse.out create mode 100644 ast_tester/fixtures/stcs/ellipse.out-20 create mode 100644 ast_tester/fixtures/stcs/ellipse.props.native create mode 100644 ast_tester/fixtures/stcs/ellipse.stcs create mode 100644 ast_tester/fixtures/stcs/ellipse.warnings create mode 100644 ast_tester/fixtures/stcs/fred-unknown-word.error create mode 100644 ast_tester/fixtures/stcs/fred-unknown-word.stcs create mode 100644 ast_tester/fixtures/stcs/misspelt-keyword.moc create mode 100644 ast_tester/fixtures/stcs/misspelt-keyword.native create mode 100644 ast_tester/fixtures/stcs/misspelt-keyword.out create mode 100644 ast_tester/fixtures/stcs/misspelt-keyword.out-20 create mode 100644 ast_tester/fixtures/stcs/misspelt-keyword.props.native create mode 100644 ast_tester/fixtures/stcs/misspelt-keyword.stcs create mode 100644 ast_tester/fixtures/stcs/misspelt-keyword.warnings create mode 100644 ast_tester/fixtures/stcs/nested-intersection-difference.native create mode 100644 ast_tester/fixtures/stcs/nested-intersection-difference.out create mode 100644 ast_tester/fixtures/stcs/nested-intersection-difference.out-20 create mode 100644 ast_tester/fixtures/stcs/nested-intersection-difference.props.native create mode 100644 ast_tester/fixtures/stcs/nested-intersection-difference.stcs create mode 100644 ast_tester/fixtures/stcs/nested-intersection-difference.warnings create mode 100644 ast_tester/fixtures/stcs/not.moc create mode 100644 ast_tester/fixtures/stcs/not.native create mode 100644 ast_tester/fixtures/stcs/not.out create mode 100644 ast_tester/fixtures/stcs/not.out-20 create mode 100644 ast_tester/fixtures/stcs/not.props.native create mode 100644 ast_tester/fixtures/stcs/not.stcs create mode 100644 ast_tester/fixtures/stcs/not.warnings create mode 100644 ast_tester/fixtures/stcs/polygon.moc create mode 100644 ast_tester/fixtures/stcs/polygon.native create mode 100644 ast_tester/fixtures/stcs/polygon.out create mode 100644 ast_tester/fixtures/stcs/polygon.out-20 create mode 100644 ast_tester/fixtures/stcs/polygon.props.native create mode 100644 ast_tester/fixtures/stcs/polygon.stcs create mode 100644 ast_tester/fixtures/stcs/polygon.warnings create mode 100644 ast_tester/fixtures/stcs/position-interval-fillfactor.moc create mode 100644 ast_tester/fixtures/stcs/position-interval-fillfactor.native create mode 100644 ast_tester/fixtures/stcs/position-interval-fillfactor.out create mode 100644 ast_tester/fixtures/stcs/position-interval-fillfactor.out-20 create mode 100644 ast_tester/fixtures/stcs/position-interval-fillfactor.props.native create mode 100644 ast_tester/fixtures/stcs/position-interval-fillfactor.stcs create mode 100644 ast_tester/fixtures/stcs/position-interval-fillfactor.warnings create mode 100644 ast_tester/fixtures/stcs/position-interval-unit-m.error create mode 100644 ast_tester/fixtures/stcs/position-interval-unit-m.stcs create mode 100644 ast_tester/fixtures/stcs/position-interval.moc create mode 100644 ast_tester/fixtures/stcs/position-interval.native create mode 100644 ast_tester/fixtures/stcs/position-interval.out create mode 100644 ast_tester/fixtures/stcs/position-interval.out-20 create mode 100644 ast_tester/fixtures/stcs/position-interval.props.native create mode 100644 ast_tester/fixtures/stcs/position-interval.stcs create mode 100644 ast_tester/fixtures/stcs/position-interval.warnings create mode 100644 ast_tester/fixtures/stcs/position.native create mode 100644 ast_tester/fixtures/stcs/position.out create mode 100644 ast_tester/fixtures/stcs/position.out-20 create mode 100644 ast_tester/fixtures/stcs/position.props.native create mode 100644 ast_tester/fixtures/stcs/position.stcs create mode 100644 ast_tester/fixtures/stcs/position.warnings create mode 100644 ast_tester/fixtures/stcs/redshift-interval.native create mode 100644 ast_tester/fixtures/stcs/redshift-interval.out create mode 100644 ast_tester/fixtures/stcs/redshift-interval.out-20 create mode 100644 ast_tester/fixtures/stcs/redshift-interval.props.native create mode 100644 ast_tester/fixtures/stcs/redshift-interval.stcs create mode 100644 ast_tester/fixtures/stcs/redshift-interval.warnings create mode 100644 ast_tester/fixtures/stcs/spectral-interval.native create mode 100644 ast_tester/fixtures/stcs/spectral-interval.out create mode 100644 ast_tester/fixtures/stcs/spectral-interval.out-20 create mode 100644 ast_tester/fixtures/stcs/spectral-interval.props.native create mode 100644 ast_tester/fixtures/stcs/spectral-interval.stcs create mode 100644 ast_tester/fixtures/stcs/spectral-interval.warnings create mode 100644 ast_tester/fixtures/stcs/stcs-ex1.moc create mode 100644 ast_tester/fixtures/stcs/stcs-ex1.native create mode 100644 ast_tester/fixtures/stcs/stcs-ex1.out create mode 100644 ast_tester/fixtures/stcs/stcs-ex1.out-20 create mode 100644 ast_tester/fixtures/stcs/stcs-ex1.props.native create mode 100644 ast_tester/fixtures/stcs/stcs-ex1.stcs create mode 100644 ast_tester/fixtures/stcs/stcs-ex1.warnings create mode 100644 ast_tester/fixtures/stcs/time-identifier.native create mode 100644 ast_tester/fixtures/stcs/time-identifier.out create mode 100644 ast_tester/fixtures/stcs/time-identifier.out-20 create mode 100644 ast_tester/fixtures/stcs/time-identifier.props.native create mode 100644 ast_tester/fixtures/stcs/time-identifier.stcs create mode 100644 ast_tester/fixtures/stcs/time-identifier.warnings create mode 100644 ast_tester/fixtures/stcs/time-spectral.native create mode 100644 ast_tester/fixtures/stcs/time-spectral.out create mode 100644 ast_tester/fixtures/stcs/time-spectral.out-20 create mode 100644 ast_tester/fixtures/stcs/time-spectral.props.native create mode 100644 ast_tester/fixtures/stcs/time-spectral.stcs create mode 100644 ast_tester/fixtures/stcs/time-spectral.warnings create mode 100644 ast_tester/fixtures/stcs/timeinterval-allsky.moc create mode 100644 ast_tester/fixtures/stcs/timeinterval-allsky.native create mode 100644 ast_tester/fixtures/stcs/timeinterval-allsky.out create mode 100644 ast_tester/fixtures/stcs/timeinterval-allsky.out-20 create mode 100644 ast_tester/fixtures/stcs/timeinterval-allsky.props.native create mode 100644 ast_tester/fixtures/stcs/timeinterval-allsky.stcs create mode 100644 ast_tester/fixtures/stcs/timeinterval-allsky.warnings create mode 100644 ast_tester/fixtures/stcs/two-axis-box.moc create mode 100644 ast_tester/fixtures/stcs/two-axis-box.native create mode 100644 ast_tester/fixtures/stcs/two-axis-box.out create mode 100644 ast_tester/fixtures/stcs/two-axis-box.out-20 create mode 100644 ast_tester/fixtures/stcs/two-axis-box.props.native create mode 100644 ast_tester/fixtures/stcs/two-axis-box.stcs create mode 100644 ast_tester/fixtures/stcs/two-axis-box.warnings create mode 100644 ast_tester/fixtures/stcs/union-allsky.moc create mode 100644 ast_tester/fixtures/stcs/union-allsky.native create mode 100644 ast_tester/fixtures/stcs/union-allsky.out create mode 100644 ast_tester/fixtures/stcs/union-allsky.out-20 create mode 100644 ast_tester/fixtures/stcs/union-allsky.props.native create mode 100644 ast_tester/fixtures/stcs/union-allsky.stcs create mode 100644 ast_tester/fixtures/stcs/union-allsky.warnings create mode 100644 newsfragments/+stcs-corpus.build diff --git a/PLAN.md b/PLAN.md index caa0852d..ad7b958d 100644 --- a/PLAN.md +++ b/PLAN.md @@ -472,6 +472,33 @@ cmake --build build --target gen_transform_oracle ast_tester/fixtures/oracle/framesets.oracle ``` +## STC-S corpus + +`fixtures/stcs/` holds STC-S documents, one row each in `corpus.txt`, with +the files that say what reading and writing each one gives; its `README.md` +gives the layout. The tree is shared, byte for byte, with the Rust port of +AST, whose StcsChan is held to the same files. + +- `check_stcs_corpus ` checks one document: the error + and message in its `.error` file, or the Native dumps of the object and + the properties KeyMap read (`.native`, `.props.native`), the warnings + (`.warnings`), the STC-S written at Indent 0 and StcsLength 70, Indent 1 + and StcsLength 20 and, for an `indent` row, Indent 1 and StcsLength 70 + (`.out`, `.out-20`, `.out-indent`), and that the `.out` text reads back to + an object written as the same text. The comparison is byte for byte on + Linux x86_64, where the files were captured, and by the rule of + `compare_dumps.c`, which it includes, elsewhere. +- One ctest per row, `stcs_corpus_`, registered from `corpus.txt` at + configure time. Two documents are listed in the program with the reason: + `timeinterval-allsky` writes nothing, and the `.out` text of `position` + is rejected by the reader; each is checked for still doing so. +- The corpus found the crash fixed in `stcschan.c` for a time sub-phrase + starting with `Time` (`time-identifier`). +- `teststcschan_c` compares the PROPS KeyMap of its third document with + `programs/teststcschan/stcschan-test1-doc3-props.ast` as dump text, as + astEqual compares only the class of two KeyMaps; the fixture was + regenerated from what astRead returns. + ## Verification ``` diff --git a/ast_tester/CMakeLists.txt b/ast_tester/CMakeLists.txt index 96d7c863..42855b3a 100644 --- a/ast_tester/CMakeLists.txt +++ b/ast_tester/CMakeLists.txt @@ -463,6 +463,46 @@ ast_add_test(testpointset_c SOURCES testpointset.c) ast_add_test(testxmlchan_c SOURCES testxmlchan.c) ast_add_test(testtable_c SOURCES testtable.c) ast_add_test(teststcschan_c SOURCES teststcschan.c) + +# The STC-S corpus: one test per document of fixtures/stcs/corpus.txt, each +# checking that the library reads and writes the document as its expectation +# files say (fixtures/stcs/README.md). The Rust port of AST is held to the +# same files. corpus.txt is read at configure time, so a change to it +# reconfigures. Its comments are removed before the text is split into +# lines, as they contain semicolons, which would split a CMake list. +add_executable(check_stcs_corpus check_stcs_corpus.c) +target_include_directories(check_stcs_corpus PRIVATE ${TEST_INCLUDES}) +target_link_libraries(check_stcs_corpus PRIVATE ${TEST_LIBS}) +target_compile_definitions(check_stcs_corpus PRIVATE HAVE_CONFIG_H) +set_target_properties(check_stcs_corpus PROPERTIES C_STANDARD 11) +ast_apply_dev_options(check_stcs_corpus) +add_dependencies(check_stcs_corpus ast_stage_fixtures) +ast_fixture_status("stcs" "stcs/corpus.txt" _stcs_ok) +if(_stcs_ok) + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS + "${AST_FIXTURE_SOURCE_ROOT}/stcs/corpus.txt") + file(READ "${AST_FIXTURE_SOURCE_ROOT}/stcs/corpus.txt" _stcs_text) + string(REGEX REPLACE "#[^\n]*" "" _stcs_text "${_stcs_text}") + string(REPLACE "\n" ";" _stcs_rows "${_stcs_text}") + foreach(_row IN LISTS _stcs_rows) + string(STRIP "${_row}" _row) + if(_row STREQUAL "") + continue() + endif() + string(REGEX MATCH "^[^ \t]+" _stcs_name "${_row}") + ast_fixture_status("stcs/corpus.txt" "stcs/${_stcs_name}.stcs" _doc_ok) + add_test(NAME stcs_corpus_${_stcs_name} + COMMAND check_stcs_corpus "${AST_FIXTURE_BINARY_ROOT}" + "${_stcs_name}" + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") + if(AST_ENABLE_SANITIZERS) + set_tests_properties(stcs_corpus_${_stcs_name} PROPERTIES + ENVIRONMENT "ASAN_OPTIONS=detect_leaks=0") + endif() + endforeach() +else() + ast_add_skipped_test(stcs_corpus) +endif() ast_add_test(testregions_c SOURCES testregions.c) ast_add_test(testwcsmap_c SOURCES testwcsmap.c) diff --git a/ast_tester/check_stcs_corpus.c b/ast_tester/check_stcs_corpus.c new file mode 100644 index 00000000..68f4e0b4 --- /dev/null +++ b/ast_tester/check_stcs_corpus.c @@ -0,0 +1,712 @@ +/* + * check_stcs_corpus: check one document of the STC-S corpus in + * fixtures/stcs against its expectation files. + * + * Usage: + * check_stcs_corpus + * + * is the fixture root, holding stcs/corpus.txt, and + * names the row of corpus.txt and the document stcs/.stcs. The + * layout of the corpus and the meaning of each expectation file are given + * in fixtures/stcs/README.md; the same files are the expectations of the + * StcsChan of the Rust port of AST, so the two libraries are held to the + * same text. + * + * The document is read through an StcsChan at ReportLevel 3 with + * StcsArea, StcsCoords and StcsProps all set. When .error exists, + * the read must fail with the status whose name is the file's first line, + * and the first message astPutErr receives after the context message that + * names the calling routine must be its second line. + * Otherwise: + * - the Native dump of the object read (a default Channel) must be + * .native, the dump of the KeyMap read with StcsProps alone set + * must be .props.native, and the warnings of the first read, one + * per line, must be .warnings; + * - the object written through an StcsChan at Indent 0 and StcsLength + * 70, at Indent 1 and StcsLength 20 and, for a row that says "indent", + * at Indent 1 and StcsLength 70 must be .out, .out-20 and + * .out-indent, each line as the sink receives it, trailing spaces + * included, followed by a newline. StcsLength is ignored at Indent 0, + * so the short-line variant is written with Indent set. Each write + * must write one object; + * - .out, read back with the three attributes set and written again + * at Indent 0 and StcsLength 70, must be the same text. + * The documents in WRITES_NOTHING_EXCLUDED and READ_BACK_EXCLUDED are + * checked for what they do instead, so that each fails when it starts to + * behave like the others. + * + * The expectation files were captured on Linux x86_64, where the texts + * must be identical. On any other platform a line may also match by the + * rule of compare_dumps.c (every token byte-equal, or both doubles within + * MAX_ULPS), which is included here so that the rule has one definition. + * The warnings and the error message are compared exactly everywhere. + * + * Exit status: 0 when every expectation of the document is met, 1 when one + * is not, 2 for a usage error or a missing file. + */ +#define COMPARE_DUMPS_NO_MAIN +#include "compare_dumps.c" + +#include "ast.h" + +#include + +/* The texts are compared byte for byte on the platform the expectation + files were captured on, and by the rule of compare_dumps.c elsewhere. */ +#if defined( __linux__ ) && defined( __x86_64__ ) +#define CAPTURE_PLATFORM 1 +#else +#define CAPTURE_PLATFORM 0 +#endif + +/* The C names of the error codes an .error file may name. A new code is + added here and nowhere else. */ +static const struct { + const char *name; + int code; +} ERROR_CODES[] = { + { "AST__ATTIN", AST__ATTIN }, + { "AST__BADIN", AST__BADIN }, + { "AST__BGWRD", AST__BGWRD }, + { "AST__INTER", AST__INTER }, + { "AST__MPKER", AST__MPKER }, +}; +#define NERROR_CODES ( (int) ( sizeof( ERROR_CODES ) / sizeof( ERROR_CODES[ 0 ] ) ) ) + +/* The documents that read but write nothing, each with the reason. Their + .out files are empty, and they are not read back. */ +static const struct { + const char *name; + const char *why; +} WRITES_NOTHING_EXCLUDED[] = { + { "timeinterval-allsky", + "AllSky after a time sub-phrase reads as an Interval whose sky axes are " + "unbounded, which cannot be written as a PositionInterval, so nothing " + "is written" }, +}; +#define NWRITES_NOTHING ( (int) ( sizeof( WRITES_NOTHING_EXCLUDED ) / sizeof( WRITES_NOTHING_EXCLUDED[ 0 ] ) ) ) + +/* The documents whose .out text the reader rejects, each with the reason. + Their .out text must still fail to read with AST__BADIN. */ +static const struct { + const char *name; + const char *why; +} READ_BACK_EXCLUDED[] = { + { "position", + "a Position sub-phrase is written with its position twice, once for " + "the shape and once as the Position property, and the reader rejects " + "the second" }, +}; +#define NREAD_BACK ( (int) ( sizeof( READ_BACK_EXCLUDED ) / sizeof( READ_BACK_EXCLUDED[ 0 ] ) ) ) + +/* One way of writing a document: the extension of its expectation file and + the Indent and StcsLength it is written with. */ +typedef struct { + const char *ext; + int indent; + int length; +} Variant; + +static const Variant WRITE_VARIANTS[] = { + { "out", 0, 70 }, + { "out-20", 1, 20 }, +}; +#define NWRITE_VARIANTS ( (int) ( sizeof( WRITE_VARIANTS ) / sizeof( WRITE_VARIANTS[ 0 ] ) ) ) + +/* The variant written for a row that says "indent". */ +static const Variant INDENT_VARIANT = { "out-indent", 1, 70 }; + +/* A growing, null-terminated text. */ +typedef struct { + char *text; + size_t len; + size_t cap; +} Text; + +/* The document and the number of failed checks, for reports. */ +static const char *docname = ""; +static int nfail = 0; + +/* The Text the sink appends to. */ +static Text *sink_text = NULL; + +/* The remainder of the text the source delivers lines from. */ +static char *source_pos = NULL; +static char *source_end = NULL; + +/* The first error message astPutErr received while capturing, and the + number of messages received. */ +static char first_error[ 4096 ]; +static int have_error = 0; +static int nmessages = 0; + +/* Record a failed check. */ +static void fail( const char *fmt, ... ) { + va_list ap; + printf( "%s: ", docname ); + va_start( ap, fmt ); + vprintf( fmt, ap ); + va_end( ap ); + printf( "\n" ); + nfail++; +} + +static void text_init( Text *t ) { + t->cap = 256; + t->len = 0; + t->text = malloc( t->cap ); + if( !t->text ) { + fprintf( stderr, "out of memory\n" ); + exit( 2 ); + } + t->text[ 0 ] = '\0'; +} + +static void text_free( Text *t ) { + free( t->text ); + t->text = NULL; + t->len = t->cap = 0; +} + +static void text_append( Text *t, const char *s ) { + size_t n = strlen( s ); + if( t->len + n + 1 > t->cap ) { + while( t->len + n + 1 > t->cap ) t->cap *= 2; + t->text = realloc( t->text, t->cap ); + if( !t->text ) { + fprintf( stderr, "out of memory\n" ); + exit( 2 ); + } + } + memcpy( t->text + t->len, s, n + 1 ); + t->len += n; +} + +/* Append each line the channel writes, followed by a newline, to the Text + in sink_text, exactly as the line is delivered. */ +static void sink( const char *line ) { + if( !sink_text ) return; + text_append( sink_text, line ); + text_append( sink_text, "\n" ); +} + +/* Deliver the next line of the source text, without its newline (or the + carriage return before one). A newline ending the text does not start + another line. */ +static const char *source( void ) { + char *line; + char *nl; + size_t n; + + if( !source_pos || source_pos >= source_end ) return NULL; + line = source_pos; + nl = memchr( line, '\n', (size_t) ( source_end - line ) ); + if( nl ) { + *nl = '\0'; + source_pos = nl + 1; + } else { + source_pos = source_end; + } + n = strlen( line ); + if( n && line[ n - 1 ] == '\r' ) line[ n - 1 ] = '\0'; + return line; +} + +/* The first report of an error made within a call to a public function is + preceded by a context message, "AST: Error in routine ... at line ... in + file ...", naming the caller's routine, line and file (astError_ in + src/error.c). That message says where this program called the library, + not what the library reported, so it is passed over: the message an + .error file records is the first one after it. */ +static void capture_err( int status_value, const char *message ) { + (void) status_value; + nmessages++; + if( nmessages == 1 && !strncmp( message, "AST: Error", 10 ) ) return; + if( !have_error ) { + snprintf( first_error, sizeof first_error, "%s", message ); + have_error = 1; + } +} + +/* The path of a file of the corpus. */ +static void corpus_path( char *buf, size_t size, const char *dir, + const char *name, const char *ext ) { + if( (size_t) snprintf( buf, size, "%s/stcs/%s%s%s", dir, name, + ext ? "." : "", ext ? ext : "" ) >= size ) { + fprintf( stderr, "path too long: %s/stcs/%s\n", dir, name ); + exit( 2 ); + } +} + +static int file_exists( const char *path ) { + FILE *fp = fopen( path, "r" ); + if( !fp ) return 0; + fclose( fp ); + return 1; +} + +/* Read the whole of a file into "t", which is initialised here. */ +static void read_file( const char *path, Text *t ) { + char buf[ 4096 ]; + size_t n; + FILE *fp = fopen( path, "rb" ); + if( !fp ) { + fprintf( stderr, "%s: cannot open %s\n", docname, path ); + exit( 2 ); + } + text_init( t ); + while( ( n = fread( buf, 1, sizeof buf - 1, fp ) ) > 0 ) { + buf[ n ] = '\0'; + if( strlen( buf ) != n ) { + fprintf( stderr, "%s: %s holds a null character\n", docname, path ); + exit( 2 ); + } + text_append( t, buf ); + } + fclose( fp ); +} + +/* Does "got" match the expected text "want"? Identical texts match + everywhere; away from the capture platform, so do texts with the same + number of lines whose lines match by the rule of compare_dumps.c. */ +static int texts_match( const char *got, const char *want ) { + static const int capture_platform = CAPTURE_PLATFORM; + char *g; + char *w; + char *gl; + char *wl; + int ok = 1; + + if( !strcmp( got, want ) ) return 1; + if( capture_platform ) return 0; + + g = malloc( strlen( got ) + 1 ); + w = malloc( strlen( want ) + 1 ); + if( !g || !w ) { + fprintf( stderr, "out of memory\n" ); + exit( 2 ); + } + strcpy( g, got ); + strcpy( w, want ); + gl = g; + wl = w; + while( ok && *gl && *wl ) { + char *gn = strchr( gl, '\n' ); + char *wn = strchr( wl, '\n' ); + if( gn ) *gn = '\0'; + if( wn ) *wn = '\0'; + ok = lines_match( gl, wl ); + gl = gn ? gn + 1 : gl + strlen( gl ); + wl = wn ? wn + 1 : wl + strlen( wl ); + } + if( ok ) ok = !*gl && !*wl; + free( g ); + free( w ); + return ok; +} + +/* Compare "got" with the file of extension "ext", reporting both texts on + a difference. */ +static void check_text( const char *got, const char *dir, const char *ext, + int exact ) { + char path[ 4096 ]; + Text want; + int ok; + + corpus_path( path, sizeof path, dir, docname, ext ); + read_file( path, &want ); + ok = exact ? !strcmp( got, want.text ) : texts_match( got, want.text ); + if( !ok ) { + fail( "the text differs from %s.%s\n--- got\n%s--- expected\n%s", + docname, ext, got, want.text ); + } + text_free( &want ); +} + +/* Read "doc" through an StcsChan at ReportLevel 3 with the given StcsArea, + StcsCoords and StcsProps. The warnings, one per line, are appended to + "warnings" when it is not NULL. */ +static AstObject *read_stcs( const char *doc, int area, int coords, + int props, Text *warnings ) { + AstStcsChan *ch; + AstObject *obj; + AstKeyMap *km; + char *copy; + size_t n = strlen( doc ); + + copy = malloc( n + 1 ); + if( !copy ) { + fprintf( stderr, "out of memory\n" ); + exit( 2 ); + } + memcpy( copy, doc, n + 1 ); + source_pos = copy; + source_end = copy + n; + + ch = astStcsChan( source, NULL, + "ReportLevel=3,StcsArea=%d,StcsCoords=%d,StcsProps=%d", + area, coords, props ); + obj = astRead( ch ); + if( warnings && astOK ) { + km = astWarnings( ch ); + if( km ) { + int i; + for( i = 1; i <= astMapSize( km ) && astOK; i++ ) { + char key[ 32 ]; + const char *msg; + snprintf( key, sizeof key, "Warning_%d", i ); + if( astMapGet0C( km, key, &msg ) ) { + text_append( warnings, msg ); + text_append( warnings, "\n" ); + } else { + fail( "the warnings have no %s", key ); + } + } + km = astAnnul( km ); + } + } + ch = astAnnul( ch ); + source_pos = source_end = NULL; + free( copy ); + return obj; +} + +/* Read "doc", which must fail, capturing the first message astPutErr + receives. Returns the status the read left, which is then cleared. */ +static int read_failing( const char *doc ) { + AstObject *obj; + int code; + + first_error[ 0 ] = '\0'; + have_error = 0; + nmessages = 0; + astSetPutErr( capture_err ); + obj = read_stcs( doc, 1, 1, 1, NULL ); + astSetPutErr( NULL ); + code = astStatus; + astClearStatus; + if( obj ) obj = astAnnul( obj ); + return code; +} + +/* Append the Native dump of "obj", written by a default Channel, to "t". */ +static void dump( AstObject *obj, Text *t ) { + AstChannel *ch = astChannel( NULL, sink, " " ); + sink_text = t; + astWrite( ch, obj ); + sink_text = NULL; + ch = astAnnul( ch ); +} + +/* Write "obj" through an StcsChan at ReportLevel 3 with the given Indent + and StcsLength, appending the text to "t". Returns the number of + objects written. */ +static int write_stcs( AstObject *obj, int indent, int length, Text *t ) { + AstStcsChan *ch; + int n; + + ch = astStcsChan( NULL, sink, "ReportLevel=3,Indent=%d,StcsLength=%d", + indent, length ); + sink_text = t; + n = astWrite( ch, obj ); + sink_text = NULL; + ch = astAnnul( ch ); + return n; +} + +/* Report and clear an error left by the step "what". */ +static int failed( const char *what ) { + if( astOK ) return 0; + fail( "%s failed with status %d", what, astStatus ); + astClearStatus; + return 1; +} + +/* The .error check: the read fails with the code and message the file + names. */ +static void check_error( const char *dir, const char *doc ) { + char path[ 4096 ]; + Text want; + char *msg; + char *end; + int code; + int i; + + corpus_path( path, sizeof path, dir, docname, "error" ); + read_file( path, &want ); + msg = strchr( want.text, '\n' ); + end = msg ? strchr( msg + 1, '\n' ) : NULL; + if( !msg || !end || end[ 1 ] ) { + fprintf( stderr, "%s: %s is not two lines\n", docname, path ); + exit( 2 ); + } + *msg++ = '\0'; + *end = '\0'; + + for( i = 0; i < NERROR_CODES; i++ ) { + if( !strcmp( ERROR_CODES[ i ].name, want.text ) ) break; + } + if( i == NERROR_CODES ) { + fprintf( stderr, "%s: %s names %s, which is not in ERROR_CODES\n", + docname, path, want.text ); + exit( 2 ); + } + + code = read_failing( doc ); + if( code == 0 ) { + fail( "the read succeeded, but %s.error expects %s", docname, + want.text ); + } else if( code != ERROR_CODES[ i ].code ) { + fail( "the read failed with status %d, not %s (%d)", code, want.text, + ERROR_CODES[ i ].code ); + } else if( strcmp( first_error, msg ) ) { + fail( "the first error message differs from %s.error\n--- got\n%s\n" + "--- expected\n%s", docname, first_error, msg ); + } + text_free( &want ); +} + +/* The reading checks. Returns the object read with all three attributes + set, or NULL if there is none. */ +static AstObject *check_reading( const char *dir, const char *doc ) { + AstObject *obj; + AstObject *props; + Text warnings; + Text t; + + text_init( &warnings ); + obj = read_stcs( doc, 1, 1, 1, &warnings ); + if( failed( "reading the document" ) || !obj ) { + if( !nfail ) fail( "no object was read" ); + text_free( &warnings ); + return NULL; + } + + text_init( &t ); + dump( obj, &t ); + if( !failed( "dumping the object read" ) ) { + check_text( t.text, dir, "native", 0 ); + } + text_free( &t ); + + props = read_stcs( doc, 0, 0, 1, NULL ); + if( !failed( "reading the properties alone" ) ) { + if( !props || !astIsAKeyMap( props ) ) { + fail( "reading the properties alone gave %s, not a KeyMap", + props ? astGetC( props, "Class" ) : "no object" ); + } else { + text_init( &t ); + dump( props, &t ); + if( !failed( "dumping the properties" ) ) { + check_text( t.text, dir, "props.native", 0 ); + } + text_free( &t ); + } + } + if( props ) props = astAnnul( props ); + + check_text( warnings.text, dir, "warnings", 1 ); + text_free( &warnings ); + return obj; +} + +static int writes_nothing( const char *name ) { + int i; + for( i = 0; i < NWRITES_NOTHING; i++ ) { + if( !strcmp( WRITES_NOTHING_EXCLUDED[ i ].name, name ) ) return 1; + } + return 0; +} + +static const char *read_back_excluded( const char *name ) { + int i; + for( i = 0; i < NREAD_BACK; i++ ) { + if( !strcmp( READ_BACK_EXCLUDED[ i ].name, name ) ) { + return READ_BACK_EXCLUDED[ i ].why; + } + } + return NULL; +} + +/* Write "obj" in "variant" and compare the text with its file. */ +static void check_variant( AstObject *obj, const char *dir, + const Variant *variant ) { + Text t; + int want = writes_nothing( docname ) ? 0 : 1; + int n; + + text_init( &t ); + n = write_stcs( obj, variant->indent, variant->length, &t ); + if( !failed( "writing" ) ) { + if( n != want ) { + fail( "writing %s wrote %d objects, not %d%s", variant->ext, n, + want, want ? "" : "; remove it from WRITES_NOTHING_EXCLUDED" ); + } + check_text( t.text, dir, variant->ext, 0 ); + } + text_free( &t ); +} + +/* The writing checks, and the read-back of the .out text. */ +static void check_writing( AstObject *obj, const char *dir, int indent ) { + char path[ 4096 ]; + const char *why; + AstObject *again; + Text out; + Text t; + int i; + int n; + + for( i = 0; i < NWRITE_VARIANTS; i++ ) { + check_variant( obj, dir, &WRITE_VARIANTS[ i ] ); + } + corpus_path( path, sizeof path, dir, docname, INDENT_VARIANT.ext ); + if( indent ) { + check_variant( obj, dir, &INDENT_VARIANT ); + } else if( file_exists( path ) ) { + fail( "%s.%s exists but the corpus.txt row does not say indent", + docname, INDENT_VARIANT.ext ); + } + + if( writes_nothing( docname ) ) return; + + corpus_path( path, sizeof path, dir, docname, "out" ); + read_file( path, &out ); + why = read_back_excluded( docname ); + if( why ) { + n = read_failing( out.text ); + if( n == 0 ) { + fail( "%s.out now reads; remove it from READ_BACK_EXCLUDED (%s)", + docname, why ); + } else if( n != AST__BADIN ) { + fail( "%s.out fails to read with status %d, not AST__BADIN: %s", + docname, n, first_error ); + } + } else { + again = read_stcs( out.text, 1, 1, 1, NULL ); + if( !failed( "reading back the .out text" ) ) { + if( !again ) { + fail( "%s.out read back gives no object", docname ); + } else { + text_init( &t ); + n = write_stcs( again, 0, 70, &t ); + if( !failed( "writing the .out text read back" ) ) { + if( n != 1 ) { + fail( "%s.out read back writes %d objects", docname, n ); + } + if( !texts_match( t.text, out.text ) ) { + fail( "%s.out read back is written as other text\n" + "--- got\n%s--- expected\n%s", docname, t.text, + out.text ); + } + } + text_free( &t ); + again = astAnnul( again ); + } + } + } + text_free( &out ); +} + +/* Find the row of corpus.txt for "name" and return whether it says + "indent". Every document named in an exclusion list must have a row. */ +static int corpus_row( const char *dir, const char *name ) { + char path[ 4096 ]; + char line[ 4096 ]; + int found = 0; + int indent = 0; + int nwn = 0; + int nrb = 0; + int i; + FILE *fp; + + if( (size_t) snprintf( path, sizeof path, "%s/stcs/corpus.txt", dir ) + >= sizeof path ) { + fprintf( stderr, "path too long: %s/stcs/corpus.txt\n", dir ); + exit( 2 ); + } + fp = fopen( path, "r" ); + if( !fp ) { + fprintf( stderr, "%s: cannot open %s\n", name, path ); + exit( 2 ); + } + while( fgets( line, sizeof line, fp ) ) { + char *save = NULL; + char *word; + char *hash = strchr( line, '#' ); + if( hash ) *hash = '\0'; + word = strtok_r( line, " \t\r\n", &save ); + if( !word ) continue; + for( i = 0; i < NWRITES_NOTHING; i++ ) { + if( !strcmp( WRITES_NOTHING_EXCLUDED[ i ].name, word ) ) nwn++; + } + for( i = 0; i < NREAD_BACK; i++ ) { + if( !strcmp( READ_BACK_EXCLUDED[ i ].name, word ) ) nrb++; + } + if( strcmp( word, name ) ) continue; + if( found ) { + fprintf( stderr, "%s: corpus.txt names it twice\n", name ); + exit( 2 ); + } + found = 1; + while( ( word = strtok_r( NULL, " \t\r\n", &save ) ) ) { + if( !strcmp( word, "indent" ) ) indent = 1; + } + } + fclose( fp ); + if( !found ) { + fprintf( stderr, "%s: no row in %s\n", name, path ); + exit( 2 ); + } + if( nwn != NWRITES_NOTHING || nrb != NREAD_BACK ) { + fprintf( stderr, "%s: a document in WRITES_NOTHING_EXCLUDED or " + "READ_BACK_EXCLUDED has no row in %s\n", name, path ); + exit( 2 ); + } + return indent; +} + +int main( int argc, char *argv[] ) { + char path[ 4096 ]; + const char *dir; + AstObject *obj; + Text doc; + int indent; + int status = 0; + + if( argc != 3 ) { + fprintf( stderr, "usage: check_stcs_corpus \n" ); + return 2; + } + dir = argv[ 1 ]; + docname = argv[ 2 ]; + indent = corpus_row( dir, docname ); + + corpus_path( path, sizeof path, dir, docname, "stcs" ); + read_file( path, &doc ); + + astWatch( &status ); + astBegin; + + corpus_path( path, sizeof path, dir, docname, "error" ); + if( file_exists( path ) ) { + check_error( dir, doc.text ); + } else { + obj = check_reading( dir, doc.text ); + if( obj ) { + check_writing( obj, dir, indent ); + obj = astAnnul( obj ); + } + } + + astEnd; + text_free( &doc ); + + if( nfail ) { + printf( "%s: %d check%s failed\n", docname, nfail, + nfail == 1 ? "" : "s" ); + return 1; + } + printf( "%s: every expectation is met\n", docname ); + return 0; +} diff --git a/ast_tester/fixtures/DIST_MANIFEST b/ast_tester/fixtures/DIST_MANIFEST index 1f5d2185..24f5eba3 100644 --- a/ast_tester/fixtures/DIST_MANIFEST +++ b/ast_tester/fixtures/DIST_MANIFEST @@ -24,6 +24,10 @@ DIST_MANIFEST # Inputs for the C and Fortran test programs. programs/ +# The STC-S corpus: each document, its reading expectations and, for those +# the CDS MOC library reads, its MOC. The StcsChan tests read it. +stcs/ + # The one dump of a DssMap, which testdssmap reads. A DssMap cannot be made # through the public interface, so the test has no other way to get one, and # the file stays in the serialisation corpus because the round-trip tests and diff --git a/ast_tester/fixtures/oracle/headers.oracle b/ast_tester/fixtures/oracle/headers.oracle index c0e4c6d1..7470e8de 100644 --- a/ast_tester/fixtures/oracle/headers.oracle +++ b/ast_tester/fixtures/oracle/headers.oracle @@ -3711,6 +3711,59 @@ BAD BAD BAD BAD BAD BAD BAD BAD +[programs/stcschan-demos/stcs-ex1-field.head nin=2 nout=2 dir=forward] +# axes: lon|rad lat|rad + 1 1 3.126803491219841 -0.20332142346344614 + 300 300 3.1214780579735413 -0.1981029193427267 + 1 1 3.126803491219841 -0.20332142346344614 + 150.5 150.5 3.12413936106985 -0.20071286397934787 + 150.5 100.66666666666666 3.12413936106985 -0.20158261950394235 + 75.75 200.33333333333331 3.1254704858187763 -0.19984293608088838 + 225.25 34.222222222222221 3.1228074508388968 -0.20274211631903771 + 38.375 133.88888888888889 3.1261365178404805 -0.20100239239948633 + 187.875 233.55555555555551 3.1234738768932861 -0.1992632291231424 + 113.125 67.444444444444443 3.1248052378952922 -0.20216241226311726 + 262.625 167.11111111111111 3.1221424398876914 -0.20042255640936754 + 19.6875 266.77777777777777 3.1264682771612229 -0.19868291195024348 + 169.1875 12.074074074074073 3.1238063571272292 -0.20312883650080368 + 94.4375 111.74074074074073 3.1251380189960751 -0.20138924283468365 + 243.9375 211.40740740740742 3.1224755211020865 -0.19964956051533569 + 57.0625 45.296296296296291 3.1258041828119443 -0.20254873984970234 + 206.5625 144.96296296296296 3.1231408209567433 -0.20080940606402861 + 131.8125 244.62962962962959 3.1244720901149039 -0.19906998276612151 + 281.3125 78.518518518518519 3.1218088877239385 -0.20196864350664154 + 10.34375 178.18518518518516 3.1266354125349927 -0.20022905917714845 + 159.84375 277.85185185185185 3.1239730161597379 -0.19849015584178389 + 85.09375 23.148148148148145 3.1253048285320979 -0.20293543537013523 + 234.59375 122.81481481481481 3.1226414337141177 -0.20119584189908513 + 47.71875 222.48148148148147 3.125969512728263 -0.19945622554172313 + +[programs/stcschan-demos/stcs-ex1-field.head nin=2 nout=2 dir=inverse] + 3.126803491219841 -0.20332142346344614 1.0000000000026716 0.99999999999255351 + 3.1214780579735413 -0.1981029193427267 299.99999999999545 300.00000000000932 + 3.126803491219841 -0.20332142346344614 1.0000000000026716 0.99999999999255351 + 3.12413936106985 -0.20071286397934787 150.5 150.5 + 3.12413936106985 -0.20158261950394235 150.49999999999304 100.66666666666211 + 3.1254704858187763 -0.19984293608088838 75.750000000016598 200.33333333332732 + 3.1228074508388968 -0.20274211631903771 225.24999999999812 34.222222222217994 + 3.1261365178404805 -0.20100239239948633 38.374999999996064 133.88888888888877 + 3.1234738768932861 -0.1992632291231424 187.87499999999059 233.55555555556157 + 3.1248052378952922 -0.20216241226311726 113.12499999999288 67.44444444444585 + 3.1221424398876914 -0.20042255640936754 262.62500000000438 167.11111111110819 + 3.1264682771612229 -0.19868291195024348 19.687499999997158 266.77777777777754 + 3.1238063571272292 -0.20312883650080368 169.18750000000347 12.074074074100622 + 3.1251380189960751 -0.20138924283468365 94.437500000001165 111.74074074073543 + 3.1224755211020865 -0.19964956051533569 243.93749999999972 211.40740740741211 + 3.1258041828119443 -0.20254873984970234 57.062499999998039 45.296296296298365 + 3.1231408209567433 -0.20080940606402861 206.56250000000563 144.96296296296222 + 3.1244720901149039 -0.19906998276612151 131.81249999999977 244.62962962962422 + 3.1218088877239385 -0.20196864350664154 281.31249999999704 78.518518518524743 + 3.1266354125349927 -0.20022905917714845 10.34375000003007 178.18518518518101 + 3.1239730161597379 -0.19849015584178389 159.84374999999335 277.85185185185031 + 3.1253048285320979 -0.20293543537013523 85.09375000000459 23.148148148151193 + 3.1226414337141177 -0.20119584189908513 234.5937499999817 122.81481481481771 + 3.125969512728263 -0.19945622554172313 47.71875000002305 222.48148148147385 + [wcsconv/inputs/ait-highlatpole.head nin=2 nout=2 dir=forward] # axes: lon|rad lat|rad 1 1 1.8358254631933744 -0.693270413383131 diff --git a/ast_tester/fixtures/programs/stcschan-demos/stcs-ex1-field.head b/ast_tester/fixtures/programs/stcschan-demos/stcs-ex1-field.head new file mode 100644 index 00000000..d91f4316 --- /dev/null +++ b/ast_tester/fixtures/programs/stcschan-demos/stcs-ex1-field.head @@ -0,0 +1,16 @@ +SIMPLE = T / Written by IDL: 30-Jul-1997 05:35:42.00 +BITPIX = -32 / Bits per pixel +NAXIS = 2 / Number of dimensions +NAXIS1 = 300 / Length of x axis +NAXIS2 = 300 / Length of y axis +CTYPE1 = 'RA---TAN' / TAN projection +CTYPE2 = 'DEC--TAN' / TAN projection +CRVAL1 = 179.000 / Reference RA (deg) +CRVAL2 = -11.500 / Reference Dec (deg) +CRPIX1 = 150.500 / Reference pixel +CRPIX2 = 150.500 / Reference pixel +CDELT1 = -0.00100 / Degrees/pixel +CDELT2 = 0.00100 / Degrees/pixel +EQUINOX = 2000.0 / Equinox of coordinates +RADESYS = 'FK5 ' / Coordinate reference frame +END diff --git a/ast_tester/fixtures/programs/stcschan-demos/stcs-ex1.txt b/ast_tester/fixtures/programs/stcschan-demos/stcs-ex1.txt new file mode 100644 index 00000000..f46fb6a9 --- /dev/null +++ b/ast_tester/fixtures/programs/stcschan-demos/stcs-ex1.txt @@ -0,0 +1,13 @@ +TimeInterval TT GEOCENTER +1996-01-01T00:00:00 1996-01-01T00:30:00 +Time MJD 50814.0 Error 1.2 +Resolution 0.8 PixSize 1024.0 +Circle ICRS GEOCENTER 179.0 -11.5 0.5 +Position 179.0 -11.5 Error 0.000889 +Resolution 0.001778 Size 0.000333 0.000278 +PixSize 0.000083 0.000083 +Spectral BARYCENTER 1420.4 unit MHz +Resolution 10.0 +RedshiftInterval BARYCENTER VELOCITY OPTICAL +200.0 2300.0 Redshift 300.0 +Resolution 0.7 PixSize 0.3 diff --git a/ast_tester/fixtures/programs/stcschan-demos/stcs-ex2.txt b/ast_tester/fixtures/programs/stcschan-demos/stcs-ex2.txt new file mode 100644 index 00000000..334d3da3 --- /dev/null +++ b/ast_tester/fixtures/programs/stcschan-demos/stcs-ex2.txt @@ -0,0 +1,13 @@ +TimeInterval TT GEOCENTER +1996-01-01T00:00:00 1996-01-01T00:30:00 +Time MJD 50814.0 Error 1.2 +Resolution 0.8 PixSize 1024.0 +Circle ICRS GEOCENTER 179.5 -11.5 0.5 +Position 179.5 -11.5 Error 0.000889 +Resolution 0.001778 Size 0.000333 0.000278 +PixSize 0.000083 0.000083 +Spectral BARYCENTER 1420.4 unit MHz +Resolution 10.0 +RedshiftInterval BARYCENTER VELOCITY OPTICAL +200.0 2300.0 Redshift 300.0 +Resolution 0.7 PixSize 0.3 diff --git a/ast_tester/fixtures/programs/teststcschan/stcschan-test1-doc3-props.ast b/ast_tester/fixtures/programs/teststcschan/stcschan-test1-doc3-props.ast index b3071ef8..1637af75 100644 --- a/ast_tester/fixtures/programs/teststcschan/stcschan-test1-doc3-props.ast +++ b/ast_tester/fixtures/programs/teststcschan/stcschan-test1-doc3-props.ast @@ -1,131 +1,193 @@ Begin KeyMap # Map of key/value pairs MapSz = 16 # Size of hash table - MemCnt = 0 # Total member count + MemCnt = 8 # Total member count Key1 = "REDSHIFT_PROPS" # Item name Typ1 = 4 # Item data type (AST Object) Val1 = # Item value Begin KeyMap # Map of key/value pairs MapSz = 16 # Size of hash table - MemCnt = 0 # Total member count + MemCnt = 22 # Total member count Key1 = "DOPPLERDEF" # Item name Typ1 = 3 # Item data type (string) Val1 = "OPTICAL" # Item value - Key2 = "HILIMIT" # Item name - Typ2 = 3 # Item data type (string) - Val2 = "2300.0" # Item value - Key3 = "ID" # Item name - Typ3 = 3 # Item data type (string) - Val3 = "RedshiftInterval" # Item value - Key4 = "LOLIMIT" # Item name + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 1 # Vector length + V2_1 = 0.29999999999999999 # Item values + Key3 = "DRESOLUTION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.69999999999999996 # Item values + Key4 = "HILIMIT" # Item name Typ4 = 3 # Item data type (string) - Val4 = "200.0" # Item value - Key5 = "PIXSIZE" # Item name + Val4 = "2300.0" # Item value + Key5 = "ID" # Item name Typ5 = 3 # Item data type (string) - Val5 = "0.3" # Item value - Key6 = "REDSHIFT" # Item name + Val5 = "RedshiftInterval" # Item value + Key6 = "LOLIMIT" # Item name Typ6 = 3 # Item data type (string) - Val6 = "300.0" # Item value - Key7 = "REFPOS" # Item name + Val6 = "200.0" # Item value + Key7 = "PIXSIZE" # Item name Typ7 = 3 # Item data type (string) - Val7 = "BARYCENTER" # Item value - Key8 = "RESOLUTION" # Item name + Val7 = "0.3" # Item value + Key8 = "REDSHIFT" # Item name Typ8 = 3 # Item data type (string) - Val8 = "0.7" # Item value - Key9 = "TYPE" # Item name + Val8 = "300.0" # Item value + Key9 = "REFPOS" # Item name Typ9 = 3 # Item data type (string) - Val9 = "VELOCITY" # Item value + Val9 = "BARYCENTER" # Item value + Key10 = "RESOLUTION" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "0.7" # Item value + Key11 = "TYPE" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "VELOCITY" # Item value End KeyMap Key2 = "SPACE_PROPS" # Item name Typ2 = 4 # Item data type (AST Object) Val2 = # Item value Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? MapSz = 16 # Size of hash table - MemCnt = 0 # Total member count + MemCnt = 32 # Total member count Key1 = "CENTRE" # Item name Typ1 = 3 # Item data type (string) Val1 = "179.0 -11.5" # Item value - Key2 = "ERROR" # Item name - Typ2 = 3 # Item data type (string) - Val2 = "0.000889" # Item value - Key3 = "FRAME" # Item name - Typ3 = 3 # Item data type (string) - Val3 = "ICRS" # Item value - Key4 = "ID" # Item name - Typ4 = 3 # Item data type (string) - Val4 = "Circle" # Item value - Key5 = "PIXSIZE" # Item name - Typ5 = 3 # Item data type (string) - Val5 = "0.000083 0.000083" # Item value - Key6 = "POSITION" # Item name - Typ6 = 3 # Item data type (string) - Val6 = "179.0 -11.5" # Item value - Key7 = "RADIUS" # Item name - Typ7 = 3 # Item data type (string) - Val7 = "0.5" # Item value - Key8 = "REFPOS" # Item name + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 179 # Item values + V2_2 = -11.5 + Key3 = "DERROR" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.00088900000000000003 # Item values + Key4 = "DPIXSIZE" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 2 # Vector length + V4_1 = 8.2999999999999998e-05 # Item values + V4_2 = 8.2999999999999998e-05 + Key5 = "DPOSITION" # Item name + Typ5 = 2 # Item data type (double) + Nel5 = 2 # Vector length + V5_1 = 179 # Item values + V5_2 = -11.5 + Key6 = "DRESOLUTION" # Item name + Typ6 = 2 # Item data type (double) + Nel6 = 1 # Vector length + V6_1 = 0.0017780000000000001 # Item values + Key7 = "DSIZE" # Item name + Typ7 = 2 # Item data type (double) + Nel7 = 2 # Vector length + V7_1 = 0.00033300000000000002 # Item values + V7_2 = 0.00027799999999999998 + Key8 = "ERROR" # Item name Typ8 = 3 # Item data type (string) - Val8 = "GEOCENTER" # Item value - Key9 = "RESOLUTION" # Item name + Val8 = "0.000889" # Item value + Key9 = "FRAME" # Item name Typ9 = 3 # Item data type (string) - Val9 = "0.001778" # Item value - Key10 = "SIZE" # Item name + Val9 = "ICRS" # Item value + Key10 = "ID" # Item name Typ10 = 3 # Item data type (string) - Val10 = "0.000333 0.000278" # Item value + Val10 = "Circle" # Item value + Key11 = "PIXSIZE" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "0.000083 0.000083" # Item value + Key12 = "POSITION" # Item name + Typ12 = 3 # Item data type (string) + Val12 = "179.0 -11.5" # Item value + Key13 = "RADIUS" # Item name + Typ13 = 3 # Item data type (string) + Val13 = "0.5" # Item value + Key14 = "REFPOS" # Item name + Typ14 = 3 # Item data type (string) + Val14 = "GEOCENTER" # Item value + Key15 = "RESOLUTION" # Item name + Typ15 = 3 # Item data type (string) + Val15 = "0.001778" # Item value + Key16 = "SIZE" # Item name + Typ16 = 3 # Item data type (string) + Val16 = "0.000333 0.000278" # Item value End KeyMap Key3 = "SPECTRAL_PROPS" # Item name Typ3 = 4 # Item data type (AST Object) Val3 = # Item value Begin KeyMap # Map of key/value pairs MapSz = 16 # Size of hash table - MemCnt = 0 # Total member count - Key1 = "ID" # Item name - Typ1 = 3 # Item data type (string) - Val1 = "Spectral" # Item value - Key2 = "REFPOS" # Item name + MemCnt = 12 # Total member count + Key1 = "DRESOLUTION" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 10 # Item values + Key2 = "ID" # Item name Typ2 = 3 # Item data type (string) - Val2 = "BARYCENTER" # Item value - Key3 = "RESOLUTION" # Item name + Val2 = "Spectral" # Item value + Key3 = "REFPOS" # Item name Typ3 = 3 # Item data type (string) - Val3 = "10.0" # Item value - Key4 = "SPECTRAL" # Item name + Val3 = "BARYCENTER" # Item value + Key4 = "RESOLUTION" # Item name Typ4 = 3 # Item data type (string) - Val4 = "1420.4" # Item value - Key5 = "UNIT" # Item name + Val4 = "10.0" # Item value + Key5 = "SPECTRAL" # Item name Typ5 = 3 # Item data type (string) - Val5 = "MHz" # Item value + Val5 = "1420.4" # Item value + Key6 = "UNIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "MHz" # Item value End KeyMap Key4 = "TIME_PROPS" # Item name Typ4 = 4 # Item data type (AST Object) Val4 = # Item value Begin KeyMap # Map of key/value pairs MapSz = 16 # Size of hash table - MemCnt = 0 # Total member count - Key1 = "ERROR" # Item name - Typ1 = 3 # Item data type (string) - Val1 = "1.2" # Item value - Key2 = "ID" # Item name - Typ2 = 3 # Item data type (string) - Val2 = "TimeInterval" # Item value - Key3 = "PIXSIZE" # Item name - Typ3 = 3 # Item data type (string) - Val3 = "1024.0" # Item value - Key4 = "REFPOS" # Item name + MemCnt = 30 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 1.2 # Item values + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 1 # Vector length + V2_1 = 1024 # Item values + Key3 = "DRESOLUTION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.80000000000000004 # Item values + Key4 = "ERROR" # Item name Typ4 = 3 # Item data type (string) - Val4 = "GEOCENTER" # Item value - Key5 = "RESOLUTION" # Item name + Val4 = "1.2" # Item value + Key5 = "ID" # Item name Typ5 = 3 # Item data type (string) - Val5 = "0.8" # Item value - Key6 = "START" # Item name - Typ6 = 3 # Item data type (string) - Val6 = "1996-01-01T00:00:00" # Item value - Key7 = "STOP" # Item name - Typ7 = 3 # Item data type (string) - Val7 = "1996-01-01T00:30:00" # Item value - Key8 = "TIME" # Item name - Typ8 = 3 # Item data type (string) - Val8 = "MJD 50814.0" # Item value - Key9 = "TIMESCALE" # Item name + Val5 = "TimeInterVal" # Item value + Key6 = "MJDSTART" # Item name + Typ6 = 2 # Item data type (double) + Val6 = 50083 # Item value + Key7 = "MJDSTOP" # Item name + Typ7 = 2 # Item data type (double) + Val7 = 50083.020833333336 # Item value + Key8 = "MJDTIME" # Item name + Typ8 = 2 # Item data type (double) + Val8 = 50814 # Item value + Key9 = "PIXSIZE" # Item name Typ9 = 3 # Item data type (string) - Val9 = "TT" # Item value + Val9 = "1024.0" # Item value + Key10 = "REFPOS" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "GEoCENTER" # Item value + Key11 = "RESOLUTION" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "0.8" # Item value + Key12 = "START" # Item name + Typ12 = 3 # Item data type (string) + Val12 = "1996-01-01T00:00:00" # Item value + Key13 = "STOP" # Item name + Typ13 = 3 # Item data type (string) + Val13 = "1996-01-01T00:30:00" # Item value + Key14 = "TIME" # Item name + Typ14 = 3 # Item data type (string) + Val14 = "MJD 50814.0" # Item value + Key15 = "TIMESCALE" # Item name + Typ15 = 3 # Item data type (string) + Val15 = "TT" # Item value End KeyMap End KeyMap diff --git a/ast_tester/fixtures/stcs/README.md b/ast_tester/fixtures/stcs/README.md new file mode 100644 index 00000000..9241881b --- /dev/null +++ b/ast_tester/fixtures/stcs/README.md @@ -0,0 +1,71 @@ +# The STC-S corpus + +Each document is an STC-S description in `.stcs`, read by the StcsChan of the Rust port and of the C library and held to the expectation files beside it. +The same files, byte for byte, go to `ast_tester/fixtures/stcs/` in the C library's repository, where a C test program checks the C library against them, and the two trees are kept the same. + +## Layout + +`corpus.txt` has one row per document, its fields separated by white space, with `#` starting a comment that runs to the end of the line: + +```text + moc=|moc=- stcs=yes|no [indent] +``` + +- `moc=`: the document's MOC at that HEALPix order is compared with the one the CDS `moc` crate makes, and is in `.moc`. + `moc=-`: it is not, because the reader rejects the document or the `moc` crate refuses it (the comment says why). +- `stcs=yes|no`: whether the CDS `stc-s` crate parses the document by the IVOA grammar; a `no` names the grammar point in the comment. +- `indent`: the document is also written back with Indent set at the default StcsLength, as `.out-indent`. + +The expectation files of a document the reader rejects: + +- `.error`: the C name of the error code (such as `AST__BADIN`) on its first line, and the message on its second. + +Those of any other document: + +- `.native`: the Native dump of what the document reads to with StcsArea, StcsCoords and StcsProps all set, a KeyMap holding `AREA`, `COORDS` and `PROPS` where the document has them. +- `.props.native`: the Native dump of the properties KeyMap the document reads to with StcsProps alone. +- `.warnings`: the warnings of the read with all three attributes set, at ReportLevel 3, one per line; the file is empty when there are none. +- `.out`: the text a StcsChan writes for that object with Indent 0 and StcsLength 70, each line as the sink receives it, trailing space included, followed by a newline. +- `.out-20`: the same written with Indent 1 and StcsLength 20; StcsLength is ignored when Indent is zero, so this variant is written with Indent set. +- `.out-indent`, for a row that says `indent`: the same written with Indent 1 and StcsLength 70. + +And of a document with `moc=`: + +- `.moc`: the MOC the CDS `moc` crate's `stcs2moc` makes from the document at that order, in its ASCII serialization and nothing else, so Aladin and MOCPy read it. + +The dumps use the extension `.native`, not `.ast`, because every `.ast` file in the fixture tree is taken for a transform fixture by the transform oracle's coverage test. + +## Comparison + +A document reads as its expectations when its read fails with the error in its `.error` file, or when its dumps match its `.native` and `.props.native` files and its warnings match its `.warnings` file exactly. +The files were captured on Linux x86_64, where they are byte for byte what the C library at the pin dumps, and there the dumps must be identical to them. +On any other platform a numeric token may also differ from the file's within libm rounding (a relative 1e-13 with an absolute floor of 1e-14, as `c_text_eq` in `crates/starlink-ast/tests/common/mod.rs` allows), every other token being compared exactly. +The project's other golden files are captured on macOS; recapturing this corpus there would bring it to that convention. + +A document writes as its expectations when the text written for the object it reads to is its `.out`, `.out-20` and, where the row says `indent`, `.out-indent` file, and one object is written. +The written files were captured on Linux x86_64, where they are byte for byte, trailing spaces included, what the C library at the pin writes for the object it reads, and there the text must be identical to them; elsewhere a numeric token may differ within libm rounding, as for the dumps. +The `.out` text must also read back to an object that is written as the same text. +Its dump is not compared with `.native`, as it differs in C as in the port: the written text holds the words the writer supplies by default, such as `TOPOCENTER`, which the properties KeyMap then records. +Two documents are listed, with the reason, in `crates/starlink-ast/tests/test_stcschan_corpus.rs`: `timeinterval-allsky`, in `WRITES_NOTHING_EXCLUDED`, writes nothing, so its `.out` files are empty, and `position`, in `READ_BACK_EXCLUDED`, writes text the reader rejects; both are what C does. + +For a document with `moc=`, the Moc the port makes at that order from the Region the document reads to with StcsArea alone, with MinOrder equal to MaxOrder, may differ from the CDS MOC only in the cells either side of the CDS MOC's boundary (its external and internal borders). +The CDS MOC must also be the one in the `.moc` file, so that a change in the crate's rasterization is seen. +A document whose cells differ elsewhere is listed, with the reason, in `CDS_MOC_EXCLUDED` in `crates/starlink-ast/tests/test_stcschan_corpus.rs`. + +## Notes on documents + +- `time-identifier` starts its time sub-phrase with the identifier `Time`, which crashes the C library at the pin, as `timeid = TIME_ID;` at `stcschan.c:3715` is inside a comment. + Its expectation files were written by the port and checked, byte for byte, against the C library built with that one line moved out of the comment. + The fix goes upstream with these files; until it lands, the C test program cannot pass on this document. +- `timeinterval-allsky` reads to an Interval whose sky axes are unbounded, which the C library cannot write as a PositionInterval, so it writes nothing, with a warning for each limit of the first axis. +- `position` is written with its position twice, `Position ICRS TOPOCENTER 10 20 10 20`, which the reader rejects. + +## Regenerating + +The expectation files are written by the port and the CDS crates: + +```shell +STCS_CORPUS_WRITE=1 cargo test -p starlink-ast --test regions test_stcschan_corpus::write_expectations -- --ignored +``` + +A regenerated file that differs from the committed one is a change in what the reader or the writer does, to be explained before it is committed. diff --git a/ast_tester/fixtures/stcs/adass2010-figure1-nobox.moc b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.moc new file mode 100644 index 00000000..2d32cf15 --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.moc @@ -0,0 +1,132 @@ +2/102 108-109 +3/341-342 399 412 414-415 421 423 440-441 444 633-634 +4/554 640 642 1345 1347 1356 1361 1363 1372-1374 1591 1614-1615 1654 1681 1683 + 1689 1716-1717 1719 1769 1772-1773 2529-2531 2540-2542 2544 2546-2547 2550 + 2552-2553 2555-2556 2558-2559 +5/1024 1026 1032 1034 1056 1058 2208 2210 2592-2594 5376-5377 5379 5392-5394 + 5396 5400 5402 5413 5430-5431 5436-5437 5442-5443 5449 5451 5500-5502 6359 + 6363 6375 6381-6383 6443 6445-6447 6504 6506-6507 6510 6608 6610-6611 6620 + 6622-6623 6764-6765 6767 6853 6873 6901 7072-7073 7075 7085 7096-7097 7100 + 7120-7122 7124 7128 7136-7138 7140 10030-10031 10042-10043 10046-10047 10090 + 10113-10115 10172 10174 10180 10182-10183 10194 10228 10230-10231 +6/4110 4132 4134 4140 4142 4228 4256 4258 4264 8744 8746 8838 8844 8846-8847 + 8888 8890 10256 10258 10264 10266 10288 10290 10296 10380 10382 10400-10402 + 10408 21513 21515 21540-21541 21543 21549 21580 21588 21590-21591 21597 21614 + 21649 21661 21714-21715 21718-21719 21732-21733 21735 21753 21756-21757 + 21762-21763 21765-21767 21793 21795 21801-21803 22012-22014 22277 22288-22289 + 22292-22293 22336-22337 22340-22341 25429-25431 25435 25447 25450-25451 25493 + 25495 25499 25519 25521-25523 25770-25771 25778-25779 26022-26023 26034 26044 + 26046-26047 26090 26436 26438-26439 26456 26458-26459 26484 26486-26487 26885 + 26887 26893 26895 26917 26919 26925 26927 27013 27015 27021 27065 27067 27296 + 27298 27304 27306-27307 27421 27488-27489 27491 27500-27501 27503 27600-27601 + 27603 27613 28296-28297 28299 28325 28336-28337 28404-28405 28492-28494 28500 + 28504 28520 28556-28558 28564 28576 39797 39799 39805 39807 39893-39895 39901 + 39903 39925 39927 39933 39935 40110-40111 40119 40162-40163 40166-40167 + 40178-40179 40182-40183 40354 40364 40366-40367 40378 40449 40451 40692 40724 + 40726-40727 40782 40824 40826-40827 40865 40868-40869 40871 40877 40879 40916 + 40918 +7/16400 16402 16408 16410 16432 16434-16435 16920 16922 16944 16946 17028-17030 + 17036 17038 34954 34982 34988 34990-34991 35344 35346 35380 35382 35522 35528 + 35530 41036 41038 41060 41062 41068 41070 41156 41192 41194 41524 41526 41536 + 41538 41612-41614 41616 41618 41636 41640 83285 83287 83293 86048-86049 86051 + 86057 86149 86151 86168-86169 86171 86193 86205 86324-86325 86328 86358-86359 + 86373 86384-86385 86397 86450 86462 86593 86595 86604-86605 86641 86653 + 86850-86851 86854-86855 86866-86867 86869-86871 86916-86917 86919 86937 + 87008-87009 87032-87033 87036-87037 87039 87057-87059 87168-87169 87171 87177 + 87179 87201 87203 88060-88061 89092-89093 89104-89105 89408-89409 89412 + 100351 101631 101711 101715 101733-101735 101737-101739 101783 101785-101787 + 101795 101797-101799 101971 101977-101979 101989-101991 101995 102047 102069 + 102071 102081-102083 103039 103067 103069-103071 103077-103079 103107 + 103109-103111 103210-103211 103214-103215 103226-103227 103229-103231 103272 + 103274-103275 103278-103279 103290-103291 103294-103295 103978 104080 + 104082-104083 104086-104087 104140 104142-104143 104154 104180 104182-104183 + 104354 104364 104366-104367 105750 105802 105828 105830-105831 105848 + 105850-105851 105940 105942-105943 107545 107547 107569 107571 107577 107579 + 107665 107667 107673 107675 107697 107699 107705 107707 108049 108051 108093 + 108095 108181 108183 108257 108259 109090 109096 109098 109196 109198 109220 + 109222-109223 109637 109639 109681 109683 109692-109693 109695 109961 109989 + 110009 110357 110409 110448-110449 110451 110461 113192-113193 113195 113285 + 113296-113297 113299 113352-113353 113356-113357 113359 113624-113625 113628 + 113980-113982 114004 114006 114008 114020 114024 114064-114066 114072 114084 + 114088 114236-114237 114260 114264 114272-114274 114276 114308-114309 159095 + 159101 159103 159195 159217 159219 159225 159227 159569 159571 159600-159601 + 159603 159609 159611 159697 159699 159705 159707 160429-160431 160435 + 160437-160439 160462-160463 160473-160475 160643 160646-160647 160658-160659 + 160662-160663 160706-160707 160710-160711 160722-160723 161422-161423 161434 + 161460 161462-161463 161506 161516 161518-161519 161530 161795 161801-161803 + 162772-162774 162776-162778 162800 162802 162808 162810 162902-162903 163080 + 163082-163083 163122 163134 163272 163274-163275 163300 163302-163303 163322 + 163456-163457 163480-163481 163483 163505 163507 163513 163515 163676 163678 +8/65636 65638 65644 65646 65732 65734 67684 67686 67692 67694 67780 67808-67810 + 67816 67818 68124-68126 68148 68150 68240 68242 68256-68258 68260 139808 + 139810-139811 139820 139822-139823 139922 139934 139956 139958-139959 140008 + 140010 141388 141390-141391 141426 141432 141434-141435 141526 141532 141534 + 141736 141738 142080 142082-142083 142116 142118 142124 142126 142256 142258 + 142264 142266 164112 164114 164120 164122-164123 164632 164634 164656 164658 + 164664 164666 164752 164772-164774 164780 164782 166100-166102 166108 + 166128-166130 166136 166148 166176 166178 166460-166462 166468-166470 166476 + 166496 166498 166548 166552 166564-166566 166568-166570 333137 333139 333145 + 333181 333183 344201 344203 344237 344239 344592-344593 344595 344601 + 344628-344629 344631 344680-344681 344683 344769 344781 344816-344817 344819 + 344828-344829 344831 345304-345305 345316 345320-345322 345424 345426-345427 + 345472-345473 345476-345477 345488-345489 345545 345548-345549 345551 + 345584-345585 345587 345596-345597 345599 345664 345666 345704 345706 345792 + 345794-345795 345806 345842 345854 345941 346109-346111 346368-346369 346371 + 346405 346425 346428-346429 346431 346560-346561 346563 346572-346573 346575 + 346608-346609 346611 346621 347392 347394-347395 347398 347463 347473-347475 + 347649 347652-347653 347655 347672-347673 347701 347744-347745 347747 + 347756-347757 347860-347861 348044-348045 348084-348085 348141 348152-348153 + 348170-348171 348174-348175 348186-348187 348189-348191 348225-348227 + 348680-348681 348683 348705 348707 348713 348801 348803 348809 348811 + 352248-352249 352252 356352-356353 356356-356357 356381 356424-356425 + 356428-356429 356644-356645 356656-356657 356660-356661 356704-356705 + 356708-356709 356720-356721 356724-356725 357408-357409 357412-357413 + 357424-357425 357428-357429 357472-357473 357640-357641 357644-357645 + 357652-357654 357696-357697 401399 401403 406519 406523 406839 406843 406855 + 406859 406925-406927 406929-406931 406947 407101-407103 407125 407127 + 407130-407131 407139 407175 407179 407185-407187 407869-407871 407879 407883 + 407905-407907 407955 407973 407975 407979 408159 408181 408183 408273 408275 + 408281-408283 408303 408321-408323 412142-412143 412154-412155 412223 412255 + 412263 412265-412267 412273-412275 412301-412303 412306-412307 412425-412427 + 412434-412435 412839 412850-412851 412854-412855 412898-412899 412902-412903 + 412913-412915 413092 413094-413095 413106-413107 413110-413111 413154-413155 + 413158-413159 413170-413171 415916 415918-415919 415930-415931 415934-415935 + 416324 416326-416327 416338-416339 416520 416522-416523 416526-416527 + 416566-416567 416610 416620 416622-416623 416634 416724 416726-416727 417410 + 417422-417423 417462 417512 417514-417515 422994 423006-423007 423200 + 423202-423203 423212 423214-423215 423226 423318 423370 423398 423418 423766 + 430149 430151 430157-430159 430275 430281 430283 430305 430307 430313 430315 + 430657 430659 430665 430667 430689 430691 430697 430699 430785 430787 430793 + 430795 430817 430819 432228-432229 432231 432237 432239 432325 432368-432369 + 432371 432377 432379 432721 432757 432759 433024-433025 433027 433033 + 433060-433061 433063 433069 436354 436390 436396 436398-436399 436754 436760 + 436762-436763 436796 436798 436884 436886-436887 436960 436962 436968 436970 + 438544-438545 438547 438553 438580-438581 438583 438589 438720-438721 438723 + 438757 438776-438777 438779 439124-439125 439127 439133 439841 439853 439855 + 439952-439953 439955 439964-439965 439967 440032-440033 440035 440044-440045 + 440047 441424-441425 441427 441436-441437 441439 441633 441645 441748-441749 + 441751 441801 441840-441841 441843 441853 452776-452777 452779 453125 + 453136-453137 453139 453149 453192-453193 453195 453232-453233 453236-453237 + 453239 453420-453421 453432-453433 453573 453584-453585 453588-453589 + 454272-454273 454276-454277 454288-454289 454292-454293 454336-454337 + 454340-454341 454352-454353 454356-454357 454504-454505 454508-454509 + 454516-454518 454528-454529 454532 455932-455934 456020-456022 456036-456038 + 456040-456042 456048 456084-456086 456088-456090 456100 456268-456270 456272 + 456274 456292 456296 456340-456342 456344-456346 456356-456358 456360-456362 + 456952-456954 457044-457046 457048-457050 457060-457062 457064-457066 + 457100-457102 457108 457112 457120-457121 457240-457241 457244 457248-457249 + 457280-457282 457284 636287 636373-636375 636401 636403 636409-636411 636749 + 636751 636773 636775 636873 636875 636897 636899 636905 636907 638273 638275 + 638281-638283 638408-638409 638411 638433 638435 638441 638443 638785 638787 + 638793 638795 638916-638917 638919 638925 638927 638949 641711 641715 + 641738-641739 641746-641747 641834-641835 641837-641839 641843 641846-641847 + 641882-641883 641886-641887 641889-641891 642569-642571 642627 642630-642631 + 642642-642643 642646-642647 642818-642819 642822-642823 642906-642907 + 642910-642911 645642 645680 645682-645683 645686-645687 645742-645743 645754 + 645844 645846-645847 646018 646028 646030-646031 646042 646068 646070-646071 + 646114 646126-646127 647173-647175 647179 647201-647203 651100-651101 651116 + 651118 651120 651238 651244 651246-651247 651600 651602-651603 651606 652298 + 652324 652326-652327 652344 652346-652347 652482 652494 652530 652542 653058 + 653064 653066-653067 653092 653094-653095 653112 653114-653115 653206 653280 + 653282-653283 653292 653294 653832-653833 653836-653837 653876-653877 653879 + 653928-653929 653931 654017 654680 654682-654683 654710 654716 654718-654719 diff --git a/ast_tester/fixtures/stcs/adass2010-figure1-nobox.native b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.native new file mode 100644 index 00000000..c7be11c7 --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.native @@ -0,0 +1,724 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 2 # Regions combined using Boolean OR + RegionA = # First component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 2 # Regions combined using Boolean OR + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 3.1415926535897931 # Coordinate values... + X2 = 0.17453292519943295 + X3 = 3.4960947755788099 + X4 = 0.17436647054857887 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 3.3161255787892263 # Coordinate values... + X2 = 0.17453292519943295 + X3 = 3.6706277007782431 + X4 = 0.17436647054857884 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End CmpRegion + RegionB = # Second component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.0943951023931953 # Coordinate values... + X2 = -0.17453292519943295 + X3 = 2.4488972243822125 + X4 = -0.1743664705485789 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.2689280275926285 # Coordinate values... + X2 = -0.17453292519943295 + X3 = 2.6234301495816452 + X4 = -0.17436647054857887 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Negate = 1 # Region negated + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.1816615649929121 # Coordinate values... + X2 = -0.17453292519943295 + X3 = 2.2171066911888344 + X4 = -0.17453129285931776 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End CmpRegion + End CmpRegion + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Negate = 1 # Region negated + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.0594885173533091 # Coordinate values... + X2 = -0.13962634015954636 + X3 = 2.1123630777346873 + X4 = -0.13962446446164678 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End CmpRegion + End CmpRegion + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Union" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 3 # Item value + Key4 = "REFPOS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "GEOCENTER" # Item value + Key5 = "REGION1" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "180 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 180 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key6 = "REGION2" # Item name + Typ6 = 4 # Item data type (AST Object) + Val6 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "190 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 190 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key7 = "REGION3" # Item name + Typ7 = 4 # Item data type (AST Object) + Val7 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Intersection" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 3 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "120 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 120 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Difference" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 2 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "130 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 130 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "125 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 125 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2" # Item value + End KeyMap + End KeyMap + Key5 = "REGION3" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Not" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 1 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "118 -8" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 118 # Item values + V2_2 = -8 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "3" # Item value + End KeyMap + End KeyMap + End KeyMap + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/adass2010-figure1-nobox.out b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.out new file mode 100644 index 00000000..444dd6d0 --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.out @@ -0,0 +1 @@ +Union ICRS GEOCENTER ( Circle 180 10 20 Circle 190 10 20 Intersection ( Circle 120 -10 20 Circle 130 -10 20 Not ( Circle 125 -10 2 ) Not ( Circle 118 -8 3 ) ) ) diff --git a/ast_tester/fixtures/stcs/adass2010-figure1-nobox.out-20 b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.out-20 new file mode 100644 index 00000000..95864bc5 --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.out-20 @@ -0,0 +1,20 @@ +Union ICRS GEOCENTER( + Circle 180 10 + 20 + Circle 190 10 + 20 + Intersection ( + Circle 120 + -10 20 + Circle 130 + -10 20 + Not ( + Circle + 125 -10 2 + ) + Not ( + Circle + 118 -8 3 + ) + ) + ) diff --git a/ast_tester/fixtures/stcs/adass2010-figure1-nobox.props.native b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.props.native new file mode 100644 index 00000000..65b778ed --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.props.native @@ -0,0 +1,198 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Union" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 3 # Item value + Key4 = "REFPOS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "GEOCENTER" # Item value + Key5 = "REGION1" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "180 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 180 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key6 = "REGION2" # Item name + Typ6 = 4 # Item data type (AST Object) + Val6 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "190 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 190 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key7 = "REGION3" # Item name + Typ7 = 4 # Item data type (AST Object) + Val7 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Intersection" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 3 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "120 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 120 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Difference" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 2 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "130 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 130 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "125 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 125 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2" # Item value + End KeyMap + End KeyMap + Key5 = "REGION3" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Not" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 1 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "118 -8" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 118 # Item values + V2_2 = -8 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "3" # Item value + End KeyMap + End KeyMap + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/adass2010-figure1-nobox.stcs b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.stcs new file mode 100644 index 00000000..39e40a07 --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.stcs @@ -0,0 +1,12 @@ +Union ICRS GEOCENTER ( + Circle 180 10 20 + Circle 190 10 20 + Intersection ( + Circle 120 -10 20 + Difference ( + Circle 130 -10 20 + Circle 125 -10 2 + ) + Not (Circle 118 -8 3) + ) +) diff --git a/ast_tester/fixtures/stcs/adass2010-figure1-nobox.warnings b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.warnings new file mode 100644 index 00000000..12eb0cf0 --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1-nobox.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. diff --git a/ast_tester/fixtures/stcs/adass2010-figure1.native b/ast_tester/fixtures/stcs/adass2010-figure1.native new file mode 100644 index 00000000..c19d1b1e --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1.native @@ -0,0 +1,849 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 2 # Regions combined using Boolean OR + RegionA = # First component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 2 # Regions combined using Boolean OR + RegionA = # First component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 2 # Regions combined using Boolean OR + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 3.1415926535897931 # Coordinate values... + X2 = 0.17453292519943295 + X3 = 3.4960947755788099 + X4 = 0.17436647054857887 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 3.3161255787892263 # Coordinate values... + X2 = 0.17453292519943295 + X3 = 3.6706277007782431 + X4 = 0.17436647054857884 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End CmpRegion + RegionB = # Second component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.0943951023931953 # Coordinate values... + X2 = -0.17453292519943295 + X3 = 2.4488972243822125 + X4 = -0.1743664705485789 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.2689280275926285 # Coordinate values... + X2 = -0.17453292519943295 + X3 = 2.6234301495816452 + X4 = -0.17436647054857887 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Negate = 1 # Region negated + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.1816615649929121 # Coordinate values... + X2 = -0.17453292519943295 + X3 = 2.2171066911888344 + X4 = -0.17453129285931776 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End CmpRegion + End CmpRegion + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Negate = 1 # Region negated + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.0594885173533091 # Coordinate values... + X2 = -0.13962634015954636 + X3 = 2.1123630777346873 + X4 = -0.13962446446164678 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End CmpRegion + End CmpRegion + RegionB = # Second component Region + Begin Polygon # Polygonal region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 4 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.6517779819332117 # Coordinate values... + X2 = -1.3841241285538304e-17 + X3 = 3.107808549648075 + X4 = 1.3841241285538284e-17 + X5 = 3.314312018315833 + X6 = -1.00397125670348 + X7 = 2.4452745132654532 + X8 = -1.0039712567034795 + End PointSet + IsA Region # An area within a coordinate system + Order = 1 # Polygon uses STC vertex order convention + End Polygon + End CmpRegion + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 16 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Union" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 4 # Item value + Key4 = "REFPOS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "GEOCENTER" # Item value + Key5 = "REGION1" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "180 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 180 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key6 = "REGION2" # Item name + Typ6 = 4 # Item data type (AST Object) + Val6 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "190 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 190 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key7 = "REGION3" # Item name + Typ7 = 4 # Item data type (AST Object) + Val7 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Intersection" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 3 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "120 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 120 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Difference" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 2 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "130 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 130 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "125 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 125 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2" # Item value + End KeyMap + End KeyMap + Key5 = "REGION3" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Not" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 1 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "118 -8" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 118 # Item values + V2_2 = -8 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "3" # Item value + End KeyMap + End KeyMap + End KeyMap + Key8 = "REGION4" # Item name + Typ8 = 4 # Item data type (AST Object) + Val8 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "BSIZE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "30 60" # Item value + Key2 = "CENTRE" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "165 -30" # Item value + Key3 = "DBSIZE" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 2 # Vector length + V3_1 = 30 # Item values + V3_2 = 60 + Key4 = "DCENTRE" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 2 # Vector length + V4_1 = 165 # Item values + V4_2 = -30 + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "Box" # Item value + End KeyMap + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/adass2010-figure1.out b/ast_tester/fixtures/stcs/adass2010-figure1.out new file mode 100644 index 00000000..0359b70c --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1.out @@ -0,0 +1 @@ +Union ICRS GEOCENTER ( Circle 180 10 20 Circle 190 10 20 Intersection ( Circle 120 -10 20 Circle 130 -10 20 Not ( Circle 125 -10 2 ) Not ( Circle 118 -8 3 ) ) Polygon 151.9357 -7.930447e-16 178.0643 7.930447e-16 189.8961 -57.52332 140.1039 -57.52332 ) diff --git a/ast_tester/fixtures/stcs/adass2010-figure1.out-20 b/ast_tester/fixtures/stcs/adass2010-figure1.out-20 new file mode 100644 index 00000000..60b3c5df --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1.out-20 @@ -0,0 +1,29 @@ +Union ICRS GEOCENTER( + Circle 180 10 + 20 + Circle 190 10 + 20 + Intersection ( + Circle 120 + -10 20 + Circle 130 + -10 20 + Not ( + Circle + 125 -10 2 + ) + Not ( + Circle + 118 -8 3 + ) + ) + Polygon + 151.9357 + -7.930447e-16 + 178.0643 + 7.930447e-16 + 189.8961 + -57.52332 + 140.1039 + -57.52332 + ) diff --git a/ast_tester/fixtures/stcs/adass2010-figure1.out-indent b/ast_tester/fixtures/stcs/adass2010-figure1.out-indent new file mode 100644 index 00000000..9679932f --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1.out-indent @@ -0,0 +1,16 @@ +Union ICRS GEOCENTER ( + Circle 180 10 20 + Circle 190 10 20 + Intersection ( + Circle 120 -10 20 + Circle 130 -10 20 + Not ( + Circle 125 -10 2 + ) + Not ( + Circle 118 -8 3 + ) + ) + Polygon 151.9357 -7.930447e-16 178.0643 7.930447e-16 189.8961 + -57.52332 140.1039 -57.52332 + ) diff --git a/ast_tester/fixtures/stcs/adass2010-figure1.props.native b/ast_tester/fixtures/stcs/adass2010-figure1.props.native new file mode 100644 index 00000000..27dc387b --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1.props.native @@ -0,0 +1,225 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 16 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Union" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 4 # Item value + Key4 = "REFPOS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "GEOCENTER" # Item value + Key5 = "REGION1" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "180 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 180 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key6 = "REGION2" # Item name + Typ6 = 4 # Item data type (AST Object) + Val6 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "190 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 190 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key7 = "REGION3" # Item name + Typ7 = 4 # Item data type (AST Object) + Val7 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Intersection" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 3 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "120 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 120 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Difference" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 2 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "130 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 130 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "125 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 125 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2" # Item value + End KeyMap + End KeyMap + Key5 = "REGION3" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Not" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 1 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "118 -8" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 118 # Item values + V2_2 = -8 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "3" # Item value + End KeyMap + End KeyMap + End KeyMap + Key8 = "REGION4" # Item name + Typ8 = 4 # Item data type (AST Object) + Val8 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "BSIZE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "30 60" # Item value + Key2 = "CENTRE" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "165 -30" # Item value + Key3 = "DBSIZE" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 2 # Vector length + V3_1 = 30 # Item values + V3_2 = 60 + Key4 = "DCENTRE" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 2 # Vector length + V4_1 = 165 # Item values + V4_2 = -30 + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "Box" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/adass2010-figure1.stcs b/ast_tester/fixtures/stcs/adass2010-figure1.stcs new file mode 100644 index 00000000..5648051b --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1.stcs @@ -0,0 +1,13 @@ +Union ICRS GEOCENTER ( + Circle 180 10 20 + Circle 190 10 20 + Intersection ( + Circle 120 -10 20 + Difference ( + Circle 130 -10 20 + Circle 125 -10 2 + ) + Not (Circle 118 -8 3) + ) + Box 165 -30 30 60 +) diff --git a/ast_tester/fixtures/stcs/adass2010-figure1.warnings b/ast_tester/fixtures/stcs/adass2010-figure1.warnings new file mode 100644 index 00000000..12eb0cf0 --- /dev/null +++ b/ast_tester/fixtures/stcs/adass2010-figure1.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. diff --git a/ast_tester/fixtures/stcs/allsky-fillfactor.moc b/ast_tester/fixtures/stcs/allsky-fillfactor.moc new file mode 100644 index 00000000..af4cb864 --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky-fillfactor.moc @@ -0,0 +1,2 @@ +0/0-11 +8/ diff --git a/ast_tester/fixtures/stcs/allsky-fillfactor.native b/ast_tester/fixtures/stcs/allsky-fillfactor.native new file mode 100644 index 00000000..451bf5f8 --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky-fillfactor.native @@ -0,0 +1,74 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin NullRegion # Boundless region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Negate = 1 # Region negated + Fill = 0.5 # Region fill factor + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + End NullRegion + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "FILLFACTOR" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "0.5" # Item value + Key2 = "FRAME" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "ICRS" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "AllSky" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/allsky-fillfactor.out b/ast_tester/fixtures/stcs/allsky-fillfactor.out new file mode 100644 index 00000000..6c70f1c0 --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky-fillfactor.out @@ -0,0 +1 @@ +AllSky fillfactor 0.5 ICRS TOPOCENTER diff --git a/ast_tester/fixtures/stcs/allsky-fillfactor.out-20 b/ast_tester/fixtures/stcs/allsky-fillfactor.out-20 new file mode 100644 index 00000000..0ccd5f5e --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky-fillfactor.out-20 @@ -0,0 +1,3 @@ +AllSky fillfactor + 0.5 ICRS + TOPOCENTER diff --git a/ast_tester/fixtures/stcs/allsky-fillfactor.props.native b/ast_tester/fixtures/stcs/allsky-fillfactor.props.native new file mode 100644 index 00000000..6b9d7e47 --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky-fillfactor.props.native @@ -0,0 +1,21 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "FILLFACTOR" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "0.5" # Item value + Key2 = "FRAME" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "ICRS" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "AllSky" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/allsky-fillfactor.stcs b/ast_tester/fixtures/stcs/allsky-fillfactor.stcs new file mode 100644 index 00000000..eadcceb3 --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky-fillfactor.stcs @@ -0,0 +1 @@ +AllSky fillfactor 0.5 ICRS diff --git a/ast_tester/fixtures/stcs/allsky-fillfactor.warnings b/ast_tester/fixtures/stcs/allsky-fillfactor.warnings new file mode 100644 index 00000000..29457709 --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky-fillfactor.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/allsky.moc b/ast_tester/fixtures/stcs/allsky.moc new file mode 100644 index 00000000..af4cb864 --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky.moc @@ -0,0 +1,2 @@ +0/0-11 +8/ diff --git a/ast_tester/fixtures/stcs/allsky.native b/ast_tester/fixtures/stcs/allsky.native new file mode 100644 index 00000000..f6fe91b7 --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky.native @@ -0,0 +1,70 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin NullRegion # Boundless region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Negate = 1 # Region negated + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + End NullRegion + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "AllSky" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/allsky.out b/ast_tester/fixtures/stcs/allsky.out new file mode 100644 index 00000000..86756c85 --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky.out @@ -0,0 +1 @@ +AllSky ICRS TOPOCENTER diff --git a/ast_tester/fixtures/stcs/allsky.out-20 b/ast_tester/fixtures/stcs/allsky.out-20 new file mode 100644 index 00000000..a3360bc5 --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky.out-20 @@ -0,0 +1,2 @@ +AllSky ICRS + TOPOCENTER diff --git a/ast_tester/fixtures/stcs/allsky.props.native b/ast_tester/fixtures/stcs/allsky.props.native new file mode 100644 index 00000000..1e7ab5bc --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky.props.native @@ -0,0 +1,18 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "AllSky" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/allsky.stcs b/ast_tester/fixtures/stcs/allsky.stcs new file mode 100644 index 00000000..aea473a2 --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky.stcs @@ -0,0 +1 @@ +AllSky ICRS diff --git a/ast_tester/fixtures/stcs/allsky.warnings b/ast_tester/fixtures/stcs/allsky.warnings new file mode 100644 index 00000000..29457709 --- /dev/null +++ b/ast_tester/fixtures/stcs/allsky.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/circle-arcsec.native b/ast_tester/fixtures/stcs/circle-arcsec.native new file mode 100644 index 00000000..567ad191 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-arcsec.native @@ -0,0 +1,91 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 4.8481368110953597e-05 # Coordinate values... + X2 = 9.6962736221907193e-05 + X3 = 5.3329504944839485e-05 + X4 = 9.6962736221907193e-05 + End PointSet + IsA Region # An area within a coordinate system + End Circle + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Circle" # Item value + Key5 = "RADIUS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1" # Item value + Key6 = "UNIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "arcsec" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/circle-arcsec.out b/ast_tester/fixtures/stcs/circle-arcsec.out new file mode 100644 index 00000000..6c68be44 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-arcsec.out @@ -0,0 +1 @@ +Circle ICRS TOPOCENTER 10 20 1 unit arcsec diff --git a/ast_tester/fixtures/stcs/circle-arcsec.out-20 b/ast_tester/fixtures/stcs/circle-arcsec.out-20 new file mode 100644 index 00000000..38761834 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-arcsec.out-20 @@ -0,0 +1,3 @@ +Circle ICRS + TOPOCENTER 10 20 + 1 unit arcsec diff --git a/ast_tester/fixtures/stcs/circle-arcsec.props.native b/ast_tester/fixtures/stcs/circle-arcsec.props.native new file mode 100644 index 00000000..f0db529d --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-arcsec.props.native @@ -0,0 +1,32 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Circle" # Item value + Key5 = "RADIUS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1" # Item value + Key6 = "UNIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "arcsec" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/circle-arcsec.stcs b/ast_tester/fixtures/stcs/circle-arcsec.stcs new file mode 100644 index 00000000..9f7f16fc --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-arcsec.stcs @@ -0,0 +1 @@ +Circle ICRS 10 20 1 unit arcsec diff --git a/ast_tester/fixtures/stcs/circle-arcsec.warnings b/ast_tester/fixtures/stcs/circle-arcsec.warnings new file mode 100644 index 00000000..29457709 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-arcsec.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/circle-unit-m.error b/ast_tester/fixtures/stcs/circle-unit-m.error new file mode 100644 index 00000000..5bb23b04 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-unit-m.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): Unsupported units (m) for a spherical co-ordinate system within an STC-S description. diff --git a/ast_tester/fixtures/stcs/circle-unit-m.stcs b/ast_tester/fixtures/stcs/circle-unit-m.stcs new file mode 100644 index 00000000..007048c9 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-unit-m.stcs @@ -0,0 +1 @@ +Circle ICRS 10 20 1 unit m diff --git a/ast_tester/fixtures/stcs/compound-union.native b/ast_tester/fixtures/stcs/compound-union.native new file mode 100644 index 00000000..a17a787b --- /dev/null +++ b/ast_tester/fixtures/stcs/compound-union.native @@ -0,0 +1,849 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 2 # Regions combined using Boolean OR + RegionA = # First component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 2 # Regions combined using Boolean OR + RegionA = # First component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 2 # Regions combined using Boolean OR + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 3.1415926535897931 # Coordinate values... + X2 = 0.17453292519943295 + X3 = 3.4960947755788099 + X4 = 0.17436647054857887 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 3.3161255787892263 # Coordinate values... + X2 = 0.17453292519943295 + X3 = 3.6706277007782431 + X4 = 0.17436647054857884 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End CmpRegion + RegionB = # Second component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.0943951023931953 # Coordinate values... + X2 = -0.17453292519943295 + X3 = 2.4488972243822125 + X4 = -0.1743664705485789 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.2689280275926285 # Coordinate values... + X2 = -0.17453292519943295 + X3 = 2.6234301495816452 + X4 = -0.17436647054857887 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Negate = 1 # Region negated + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.1816615649929121 # Coordinate values... + X2 = -0.17453292519943295 + X3 = 2.2171066911888344 + X4 = -0.17453129285931776 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End CmpRegion + End CmpRegion + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Negate = 1 # Region negated + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.0594885173533091 # Coordinate values... + X2 = -0.13962634015954636 + X3 = 2.1123630777346873 + X4 = -0.13962446446164678 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End CmpRegion + End CmpRegion + RegionB = # Second component Region + Begin Polygon # Polygonal region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 4 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.6517779819332117 # Coordinate values... + X2 = -1.3841241285538304e-17 + X3 = 3.107808549648075 + X4 = 1.3841241285538284e-17 + X5 = 3.314312018315833 + X6 = -1.00397125670348 + X7 = 2.4452745132654532 + X8 = -1.0039712567034795 + End PointSet + IsA Region # An area within a coordinate system + Order = 1 # Polygon uses STC vertex order convention + End Polygon + End CmpRegion + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 16 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Union" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 4 # Item value + Key4 = "REFPOS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "TOPOCENTER" # Item value + Key5 = "REGION1" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "180 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 180 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key6 = "REGION2" # Item name + Typ6 = 4 # Item data type (AST Object) + Val6 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "190 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 190 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key7 = "REGION3" # Item name + Typ7 = 4 # Item data type (AST Object) + Val7 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Intersection" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 3 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "120 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 120 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Difference" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 2 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "130 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 130 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "125 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 125 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2" # Item value + End KeyMap + End KeyMap + Key5 = "REGION3" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Not" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 1 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "118 -8" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 118 # Item values + V2_2 = -8 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "3" # Item value + End KeyMap + End KeyMap + End KeyMap + Key8 = "REGION4" # Item name + Typ8 = 4 # Item data type (AST Object) + Val8 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "BSIZE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "30 60" # Item value + Key2 = "CENTRE" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "165 -30" # Item value + Key3 = "DBSIZE" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 2 # Vector length + V3_1 = 30 # Item values + V3_2 = 60 + Key4 = "DCENTRE" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 2 # Vector length + V4_1 = 165 # Item values + V4_2 = -30 + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "Box" # Item value + End KeyMap + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/compound-union.out b/ast_tester/fixtures/stcs/compound-union.out new file mode 100644 index 00000000..96c1e9a1 --- /dev/null +++ b/ast_tester/fixtures/stcs/compound-union.out @@ -0,0 +1 @@ +Union ICRS TOPOCENTER ( Circle 180 10 20 Circle 190 10 20 Intersection ( Circle 120 -10 20 Circle 130 -10 20 Not ( Circle 125 -10 2 ) Not ( Circle 118 -8 3 ) ) Polygon 151.9357 -7.930447e-16 178.0643 7.930447e-16 189.8961 -57.52332 140.1039 -57.52332 ) diff --git a/ast_tester/fixtures/stcs/compound-union.out-20 b/ast_tester/fixtures/stcs/compound-union.out-20 new file mode 100644 index 00000000..d986a885 --- /dev/null +++ b/ast_tester/fixtures/stcs/compound-union.out-20 @@ -0,0 +1,30 @@ +Union ICRS + TOPOCENTER ( + Circle 180 10 + 20 + Circle 190 10 + 20 + Intersection ( + Circle 120 + -10 20 + Circle 130 + -10 20 + Not ( + Circle + 125 -10 2 + ) + Not ( + Circle + 118 -8 3 + ) + ) + Polygon + 151.9357 + -7.930447e-16 + 178.0643 + 7.930447e-16 + 189.8961 + -57.52332 + 140.1039 + -57.52332 + ) diff --git a/ast_tester/fixtures/stcs/compound-union.props.native b/ast_tester/fixtures/stcs/compound-union.props.native new file mode 100644 index 00000000..329942b0 --- /dev/null +++ b/ast_tester/fixtures/stcs/compound-union.props.native @@ -0,0 +1,225 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 16 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Union" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 4 # Item value + Key4 = "REFPOS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "TOPOCENTER" # Item value + Key5 = "REGION1" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "180 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 180 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key6 = "REGION2" # Item name + Typ6 = 4 # Item data type (AST Object) + Val6 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "190 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 190 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key7 = "REGION3" # Item name + Typ7 = 4 # Item data type (AST Object) + Val7 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Intersection" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 3 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "120 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 120 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Difference" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 2 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "130 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 130 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "125 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 125 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2" # Item value + End KeyMap + End KeyMap + Key5 = "REGION3" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Not" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 1 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "118 -8" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 118 # Item values + V2_2 = -8 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "3" # Item value + End KeyMap + End KeyMap + End KeyMap + Key8 = "REGION4" # Item name + Typ8 = 4 # Item data type (AST Object) + Val8 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "BSIZE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "30 60" # Item value + Key2 = "CENTRE" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "165 -30" # Item value + Key3 = "DBSIZE" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 2 # Vector length + V3_1 = 30 # Item values + V3_2 = 60 + Key4 = "DCENTRE" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 2 # Vector length + V4_1 = 165 # Item values + V4_2 = -30 + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "Box" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/compound-union.stcs b/ast_tester/fixtures/stcs/compound-union.stcs new file mode 100644 index 00000000..e5fe7eec --- /dev/null +++ b/ast_tester/fixtures/stcs/compound-union.stcs @@ -0,0 +1,13 @@ +Union ICRS TOPOCENTER ( + Circle 180 10 20 + Circle 190 10 20 + Intersection ( + Circle 120 -10 20 + Difference ( + Circle 130 -10 20 + Circle 125 -10 2 + ) + Not ( Circle 118 -8 3 ) + ) + Box 165 -30 30 60 +) diff --git a/ast_tester/fixtures/stcs/compound-union.warnings b/ast_tester/fixtures/stcs/compound-union.warnings new file mode 100644 index 00000000..e69de29b diff --git a/ast_tester/fixtures/stcs/compound-with-time.moc b/ast_tester/fixtures/stcs/compound-with-time.moc new file mode 100644 index 00000000..d7e3159b --- /dev/null +++ b/ast_tester/fixtures/stcs/compound-with-time.moc @@ -0,0 +1,147 @@ +2/102 108-109 +3/341 399 412 414-415 421 423 440-441 444 633 +4/554 640 642 1361 1371-1374 1591 1614-1615 1654 1681 1683 1689 1716-1717 1719 + 1769 1772-1773 2529-2531 2536 2544 2546-2547 2550 2552-2553 2555-2556 + 2558-2559 +5/1024 1026 1032 1034 1056 1058 2208 2210 2592-2594 5386 5408-5409 5411 5414 + 5420-5421 5423 5434-5435 5453 5455 5477-5479 5483 5500-5502 6359 6363 6375 + 6381-6383 6443 6445-6447 6504 6506-6507 6510 6608 6610-6611 6620 6622-6623 + 6764-6765 6767 6853 6873 6901 7072-7073 7075 7085 7096-7097 7100 7120-7122 + 7124 7128 7136-7138 7140 10030-10031 10042-10043 10046-10047 10090 + 10113-10115 10148-10149 10160-10161 10164-10165 10167 10180 10182-10183 10194 + 10216-10217 10219 10228 10230-10231 +6/4110 4132 4134 4140 4142 4228 4256 4258 4264 8744 8746 8838 8844 8846-8847 + 8888 8890 10256 10258 10264 10266 10288 10290 10296 10380 10382 10400-10402 + 10408 20823 20829 20831 20853 20855 20861 20863 21536 21538-21539 21550 21641 + 21643 21650 21662 21668-21669 21671 21689 21728 21730-21731 21754-21755 21765 + 21767 21808-21809 21811 21817 21819 21905 21907 21925 21927 21931 22012-22014 + 22084-22085 22277 22288-22289 22292-22293 22336-22337 22340-22341 25429-25431 + 25435 25447 25450-25451 25493 25495 25499 25519 25521-25523 25770-25771 + 25778-25779 26022-26023 26034 26044 26046-26047 26090 26436 26438-26439 26456 + 26458-26459 26484 26486-26487 26885 26887 26893 26895 26917 26919 26925 26927 + 27013 27015 27021 27065 27067 27296 27298 27304 27306-27307 27421 27488-27489 + 27491 27500-27501 27503 27600-27601 27603 27613 28296-28297 28299 28325 + 28336-28337 28404-28405 28492-28494 28500 28504 28520 28556-28558 28564 28576 + 39797 39799 39805 39807 39893-39895 39901 39903 39925 39927 39933 39935 + 40110-40111 40119 40162-40163 40166-40167 40178-40179 40182-40183 40354 40364 + 40366-40367 40378 40449 40451 40600-40601 40604-40605 40608-40610 40648-40649 + 40652-40653 40664-40665 40667 40693 40724 40726-40727 40782 40824 40826-40827 + 40873 40916 40918 +7/16400 16402 16408 16410 16432 16434-16435 16920 16922 16944 16946 17028-17030 + 17036 17038 34954 34982 34988 34990-34991 35344 35346 35380 35382 35522 35528 + 35530 41036 41038 41060 41062 41068 41070 41156 41192 41194 41524 41526 41536 + 41538 41612-41614 41616 41618 41636 41640 83315 83321 83323 83409 83411 83417 + 83419 83441 83443 83796-83797 83799 83805 83807 86050 86056 86058-86059 86148 + 86150 86170 86192 86194-86195 86204 86206-86207 86560-86561 86563 86569 86592 + 86594 86606-86607 86640 86642-86643 86652 86654-86655 86661 86681 86709 + 86752-86753 86755 86764-86765 86918 86936 86938-86939 87010-87011 87034-87035 + 87038-87039 87056-87057 87059 87065 87092-87093 87095 87101 87240-87241 87243 + 87265 87267 87273 87275 87613 87615 87617 87619 87625-87627 87705-87707 + 87717-87719 87721-87723 88060-88061 88149 88320-88321 88324-88325 88327 + 88384-88386 88388-88389 88400 89092-89093 89104-89105 89408-89409 89412 + 100351 101631 101711 101715 101733-101735 101737-101739 101783 101785-101787 + 101795 101797-101799 101971 101977-101979 101989-101991 101995 102047 102069 + 102071 102081-102083 103039 103067 103069-103071 103077-103079 103107 + 103109-103111 103210-103211 103214-103215 103226-103227 103229-103231 103272 + 103274-103275 103278-103279 103290-103291 103294-103295 103978 104080 + 104082-104083 104086-104087 104140 104142-104143 104154 104180 104182-104183 + 104354 104364 104366-104367 105750 105802 105828 105830-105831 105848 + 105850-105851 105940 105942-105943 107545 107547 107569 107571 107577 107579 + 107665 107667 107673 107675 107697 107699 107705 107707 108049 108051 108093 + 108095 108181 108183 108257 108259 109090 109096 109098 109196 109198 109220 + 109222-109223 109637 109639 109681 109683 109692-109693 109695 109961 109989 + 110009 110357 110409 110448-110449 110451 110461 113192-113193 113195 113285 + 113296-113297 113299 113352-113353 113356-113357 113359 113624-113625 113628 + 113980-113982 114004 114006 114008 114020 114024 114064-114066 114072 114084 + 114088 114236-114237 114260 114264 114272-114274 114276 114308-114309 159095 + 159101 159103 159195 159217 159219 159225 159227 159569 159571 159600-159601 + 159603 159609 159611 159697 159699 159705 159707 160429-160431 160435 + 160437-160439 160462-160463 160473-160475 160643 160646-160647 160658-160659 + 160662-160663 160706-160707 160710-160711 160722-160723 161422-161423 161434 + 161460 161462-161463 161506 161516 161518-161519 161530 161795 161801-161803 + 162408-162410 162412-162413 162444-162446 162448-162450 162452 162464-162466 + 162620-162621 162664-162665 162667 162757 162768-162769 162771 162780-162781 + 162783 162902-162903 163080 163082-163083 163122 163134 163272 163274-163275 + 163300 163302-163303 163322 163488-163489 163491 163500-163501 163503 163676 + 163678 +8/65636 65638 65644 65646 65732 65734 67684 67686 67692 67694 67780 67808-67810 + 67816 67818 68124-68126 68148 68150 68240 68242 68256-68258 68260 139808 + 139810-139811 139820 139822-139823 139922 139934 139956 139958-139959 140008 + 140010 141388 141390-141391 141426 141432 141434-141435 141526 141532 141534 + 141736 141738 142080 142082-142083 142116 142118 142124 142126 142256 142258 + 142264 142266 164112 164114 164120 164122-164123 164632 164634 164656 164658 + 164664 164666 164752 164772-164774 164780 164782 166100-166102 166108 + 166128-166130 166136 166148 166176 166178 166460-166462 166468-166470 166476 + 166496 166498 166548 166552 166564-166566 166568-166570 333137 333139-333140 + 333142 333145-333148 333150 333165 333167 333253-333255 333633 333635 333641 + 333643 333665 333667 333796-333797 333799 333805 333807 335192-335193 335195 + 335217 335219 335317 335319 344106 344192 344194-344195 344206 344228 + 344230-344231 344250 344604 344606 344674 344772 344774-344775 344792 344794 + 344822 345002 346248-346249 346251 346273 346285 346374 346380 346382-346383 + 346416 346418-346419 346474 346566 346586 346614-346615 346640-346641 346643 + 346652-346653 346655 346720-346721 346723 346732-346733 346735 346832-346833 + 346845 347016-347017 347019 347044-347045 347068-347069 347304 347306-347307 + 347666 347676 347678-347679 347750-347751 347768 347770-347771 347774 348032 + 348034-348035 348038 348056 348058-348059 348062 348128 348130-348131 + 348134-348135 348181 348183 348232-348233 348235 348257 348269 348271 348377 + 348379 348401 348412-348413 348415 348757 348759 348968-348969 348971 349057 + 349059 349065 349067 349089 349091 349097 349099 350423 350429 350431 350457 + 350459 350465 350467 350473 350475 350497-350499 350783 350797 350799 350819 + 350863 350867 350882-350883 352248-352249 352252 352580-352581 352592-352593 + 352595 353288-353289 353292-353293 353304-353305 353307 353548-353550 + 353560-353561 353564-353565 353604-353606 353616 356352-356353 356356-356357 + 356381 356424-356425 356428-356429 356644-356645 356656-356657 356660-356661 + 356704-356705 356708-356709 356720-356721 356724-356725 357408-357409 + 357412-357413 357424-357425 357428-357429 357472-357473 357640-357641 + 357644-357645 357652-357654 357696-357697 401399 401403 406519 406523 406839 + 406843 406855 406859 406925-406927 406929-406931 406947 407101-407103 407125 + 407127 407130-407131 407139 407175 407179 407185-407187 407869-407871 407879 + 407883 407905-407907 407955 407973 407975 407979 408159 408181 408183 408273 + 408275 408281-408283 408303 408321-408323 412142-412143 412154-412155 412223 + 412255 412263 412265-412267 412273-412275 412301-412303 412306-412307 + 412425-412427 412434-412435 412839 412850-412851 412854-412855 412898-412899 + 412902-412903 412913-412915 413092 413094-413095 413106-413107 413110-413111 + 413154-413155 413158-413159 413170-413171 415916 415918-415919 415930-415931 + 415934-415935 416324 416326-416327 416338-416339 416520 416522-416523 + 416526-416527 416566-416567 416610 416620 416622-416623 416634 416724 + 416726-416727 417410 417422-417423 417462 417512 417514-417515 422994 + 423006-423007 423200 423202-423203 423212 423214-423215 423226 423318 423370 + 423398 423418 423766 430149 430151 430157-430159 430275 430281 430283 430305 + 430307 430313 430315 430657 430659 430665 430667 430689 430691 430697 430699 + 430785 430787 430793 430795 430817 430819 432228-432229 432231 432237 432239 + 432325 432368-432369 432371 432377 432379 432721 432757 432759 433024-433025 + 433027 433033 433060-433061 433063 433069 436354 436390 436396 436398-436399 + 436754 436760 436762-436763 436796 436798 436884 436886-436887 436960 436962 + 436968 436970 438544-438545 438547 438553 438580-438581 438583 438589 + 438720-438721 438723 438757 438776-438777 438779 439124-439125 439127 439133 + 439841 439853 439855 439952-439953 439955 439964-439965 439967 440032-440033 + 440035 440044-440045 440047 441424-441425 441427 441436-441437 441439 441633 + 441645 441748-441749 441751 441801 441840-441841 441843 441853 452776-452777 + 452779 453125 453136-453137 453139 453149 453192-453193 453195 453232-453233 + 453236-453237 453239 453420-453421 453432-453433 453573 453584-453585 + 453588-453589 454272-454273 454276-454277 454288-454289 454292-454293 + 454336-454337 454340-454341 454352-454353 454356-454357 454504-454505 + 454508-454509 454516-454518 454528-454529 454532 455932-455934 456020-456022 + 456036-456038 456040-456042 456048 456084-456086 456088-456090 456100 + 456268-456270 456272 456274 456292 456296 456340-456342 456344-456346 + 456356-456358 456360-456362 456952-456954 457044-457046 457048-457050 + 457060-457062 457064-457066 457100-457102 457108 457112 457120-457121 + 457240-457241 457244 457248-457249 457280-457282 457284 636287 636373-636375 + 636401 636403 636409-636411 636749 636751 636773 636775 636873 636875 636897 + 636899 636905 636907 638273 638275 638281-638283 638408-638409 638411 638433 + 638435 638441 638443 638785 638787 638793 638795 638916-638917 638919 638925 + 638927 638949 641711 641715 641738-641739 641746-641747 641834-641835 + 641837-641839 641843 641846-641847 641882-641883 641886-641887 641889-641891 + 642569-642571 642627 642630-642631 642642-642643 642646-642647 642818-642819 + 642822-642823 642906-642907 642910-642911 645642 645680 645682-645683 + 645686-645687 645742-645743 645754 645844 645846-645847 646018 646028 + 646030-646031 646042 646068 646070-646071 646114 646126-646127 647173-647175 + 647179 647201-647203 649644-649645 649656 649696-649697 649700-649701 + 649712-649713 649788 649804-649806 649812-649813 649824-649825 649868 649870 + 649872 649888-649890 649896 650417 650420-650421 650464-650465 650468-650469 + 650471 650492-650493 650664-650665 650667 651013 651024-651025 651027 651037 + 651080-651081 651083 651108-651109 651129 651221 651600 651602-651603 651606 + 652298 652324 652326-652327 652344 652346-652347 652482 652494 652530 652542 + 653058 653064 653066-653067 653092 653094-653095 653112 653114-653115 653206 + 653280 653282-653283 653292 653294 653961 653989 654009 654680 654682-654683 + 654710 654716 654718-654719 diff --git a/ast_tester/fixtures/stcs/compound-with-time.native b/ast_tester/fixtures/stcs/compound-with-time.native new file mode 100644 index 00000000..e9de3989 --- /dev/null +++ b/ast_tester/fixtures/stcs/compound-with-time.native @@ -0,0 +1,1387 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Prism # Region extrusion into higher dimensions +# Title = "5-d compound coordinate system" # Title of coordinate system +# Naxes = 5 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM-REDSHIFT" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Frequency" # Label for axis 4 +# Lbl5 = "Optical velocity" # Label for axis 5 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "MHz" # Units for axis 4 +# Uni5 = "km/s" # Units for axis 5 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "5-d compound coordinate system" # Title of coordinate system +# Naxes = 5 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM-REDSHIFT" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Frequency" # Label for axis 4 +# Lbl5 = "Optical velocity" # Label for axis 5 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "MHz" # Units for axis 4 +# Uni5 = "km/s" # Units for axis 5 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin CmpFrame # Compound coordinate system description + FrameA = # First component Frame + Begin CmpFrame # Compound coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SkyFrame # Description of celestial coordinate system + Naxes = 2 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "ICRS" # Coordinate system type + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description + End SkyFrame + End CmpFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "FREQ" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "MHz" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UFreq = "MHz" # Preferred units for frequency + End SpecFrame + End CmpFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Domain = "REDSHIFT" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "VOPT" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "km/s" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UVopt = "km/s" # Preferred units for optical velocity + End SpecFrame + End CmpFrame + RegAxes = 5 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin Prism # Region extrusion into higher dimensions +# Title = "4-d compound coordinate system" # Title of coordinate system +# Naxes = 4 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Frequency" # Label for axis 4 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "MHz" # Units for axis 4 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + RegAxes = 4 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin Prism # Region extrusion into higher dimensions +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SkyFrame # Description of celestial coordinate system + Naxes = 2 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "ICRS" # Coordinate system type + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description + End SkyFrame + End CmpFrame + RegAxes = 3 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin Box # Axis intervals +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Closed = 1 # Boundary is inside + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin TimeFrame # Description of time coordinate system +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.010416666667879326 # Coordinate values... + X2 = 0.020833333335758653 + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin TimeFrame # Description of time coordinate system +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.010416666667879326 # Coordinate values... + X2 = 0.010430555556768216 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End Box + RegionB = # Second component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 2 # Regions combined using Boolean OR + RegionA = # First component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 2 # Regions combined using Boolean OR + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 3.1415926535897931 # Coordinate values... + X2 = 0.17453292519943295 + X3 = 3.4960947755788099 + X4 = 0.17436647054857887 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 3.3161255787892263 # Coordinate values... + X2 = 0.17453292519943295 + X3 = 3.6706277007782431 + X4 = 0.17436647054857884 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End CmpRegion + RegionB = # Second component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.0943951023931953 # Coordinate values... + X2 = -0.17453292519943295 + X3 = 2.4488972243822125 + X4 = -0.1743664705485789 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 3 # Regions combined using Boolean XOR + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.2689280275926285 # Coordinate values... + X2 = -0.17453292519943295 + X3 = 2.6234301495816452 + X4 = -0.17436647054857887 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.0071286397934789 # Coordinate values... + X2 = -0.17453292519943295 + X3 = 2.1843603853285845 + X4 = -0.17449192391968965 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End CmpRegion + End CmpRegion + End CmpRegion + End Prism + RegionB = # Second component Region + Begin PointList # Collection of points +# Title = "Frequency (Barycentric)" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Frequency" # Label for axis 1 +# System = "FREQ" # Coordinate system type +# Uni1 = "MHz" # Units for axis 1 + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SpecFrame # Description of spectral coordinate system +# Title = "Frequency (Barycentric)" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Frequency" # Label for axis 1 + System = "FREQ" # Coordinate system type +# Uni1 = "MHz" # Units for axis 1 + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "MHz" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UFreq = "MHz" # Preferred units for frequency + End SpecFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 1420.4000000000001 # Coordinate values... + End PointSet + IsA Region # An area within a coordinate system + End PointList + End Prism + RegionB = # Second component Region + Begin Box # Axis intervals +# Title = "Optical velocity (Barycentric), rest frequency = 100000 GHz" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Optical velocity" # Label for axis 1 +# System = "VOPT" # Coordinate system type +# Uni1 = "km/s" # Units for axis 1 + IsA Frame # Coordinate system description + Closed = 1 # Boundary is inside + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 1250 # Coordinate values... + X2 = 2300 + End PointSet + IsA Region # An area within a coordinate system + End Box + End Prism + Key2 = "COORDS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin Prism # Region extrusion into higher dimensions +# Title = "5-d compound coordinate system" # Title of coordinate system +# Naxes = 5 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM-REDSHIFT" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Frequency" # Label for axis 4 +# Lbl5 = "Optical velocity" # Label for axis 5 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "MHz" # Units for axis 4 +# Uni5 = "km/s" # Units for axis 5 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "5-d compound coordinate system" # Title of coordinate system +# Naxes = 5 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM-REDSHIFT" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Frequency" # Label for axis 4 +# Lbl5 = "Optical velocity" # Label for axis 5 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "MHz" # Units for axis 4 +# Uni5 = "km/s" # Units for axis 5 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin CmpFrame # Compound coordinate system description + FrameA = # First component Frame + Begin CmpFrame # Compound coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SkyFrame # Description of celestial coordinate system + Naxes = 2 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "ICRS" # Coordinate system type + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description + End SkyFrame + End CmpFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "FREQ" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "MHz" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UFreq = "MHz" # Preferred units for frequency + End SpecFrame + End CmpFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Domain = "REDSHIFT" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "VOPT" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "km/s" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UVopt = "km/s" # Preferred units for optical velocity + End SpecFrame + End CmpFrame + RegAxes = 5 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin PointList # Collection of points +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SkyFrame # Description of celestial coordinate system + Naxes = 2 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "ICRS" # Coordinate system type + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description + End SkyFrame + End CmpFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 3 # Number of coordinates per point + X1 = 731 # Coordinate values... + X2 = 3.12413936106985 + X3 = -0.2007128639793479 + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SkyFrame # Description of celestial coordinate system + Naxes = 2 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "ICRS" # Coordinate system type + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description + End SkyFrame + End CmpFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 3 # Number of coordinates per point + X1 = 731 # Coordinate values... + X2 = 3.12413936106985 + X3 = -0.2007128639793479 + X4 = 731.00001388888893 + X5 = 3.124155194916074 + X6 = -0.20069734795279143 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End PointList + RegionB = # Second component Region + Begin PointList # Collection of points +# Title = "2-d compound coordinate system" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SPECTRUM-REDSHIFT" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Frequency" # Label for axis 1 +# Lbl2 = "Optical velocity" # Label for axis 2 +# System = "Compound" # Coordinate system type +# Uni1 = "MHz" # Units for axis 1 +# Uni2 = "km/s" # Units for axis 2 + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "2-d compound coordinate system" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SPECTRUM-REDSHIFT" # Coordinate system domain +# Lbl1 = "Frequency" # Label for axis 1 +# Lbl2 = "Optical velocity" # Label for axis 2 +# Uni1 = "MHz" # Units for axis 1 +# Uni2 = "km/s" # Units for axis 2 + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "FREQ" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "MHz" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UFreq = "MHz" # Preferred units for frequency + End SpecFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Domain = "REDSHIFT" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "VOPT" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "km/s" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UVopt = "km/s" # Preferred units for optical velocity + End SpecFrame + End CmpFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 1420.4000000000001 # Coordinate values... + X2 = 300 + End PointSet + IsA Region # An area within a coordinate system + End PointList + End Prism + Key3 = "PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 22 # Total member count + Key1 = "DOPPLERDEF" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "optical" # Item value + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 1 # Vector length + V2_1 = 0.29999999999999999 # Item values + Key3 = "DRESOLUTION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.69999999999999996 # Item values + Key4 = "HILIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2300.0" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "rEDSHIFTiNTERVAL" # Item value + Key6 = "LOLIMIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "200.0" # Item value + Key7 = "PIXSIZE" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "0.3" # Item value + Key8 = "REDSHIFT" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "300.0" # Item value + Key9 = "REFPOS" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "barycenter" # Item value + Key10 = "RESOLUTION" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "0.7" # Item value + Key11 = "TYPE" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "velocity" # Item value + End KeyMap + Key2 = "SPACE_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 34 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 0.00088900000000000003 # Item values + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 8.2999999999999998e-05 # Item values + V2_2 = 8.2999999999999998e-05 + Key3 = "DPOSITION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 2 # Vector length + V3_1 = 179 # Item values + V3_2 = -11.5 + Key4 = "DRESOLUTION" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 1 # Vector length + V4_1 = 0.0017780000000000001 # Item values + Key5 = "DSIZE" # Item name + Typ5 = 2 # Item data type (double) + Nel5 = 2 # Vector length + V5_1 = 0.00033300000000000002 # Item values + V5_2 = 0.00027799999999999998 + Key6 = "ERROR" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "0.000889" # Item value + Key7 = "FRAME" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "ICRS" # Item value + Key8 = "ID" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "Union" # Item value + Key9 = "NREG" # Item name + Typ9 = 1 # Item data type (int) + Val9 = 3 # Item value + Key10 = "PIXSIZE" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "0.000083 0.000083" # Item value + Key11 = "POSITION" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "179.0 -11.5" # Item value + Key12 = "REFPOS" # Item name + Typ12 = 3 # Item data type (string) + Val12 = "GEOCENTER" # Item value + Key13 = "REGION1" # Item name + Typ13 = 4 # Item data type (AST Object) + Val13 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "180 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 180 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key14 = "REGION2" # Item name + Typ14 = 4 # Item data type (AST Object) + Val14 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "190 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 190 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key15 = "REGION3" # Item name + Typ15 = 4 # Item data type (AST Object) + Val15 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Intersection" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 3 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "120 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 120 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "cIRCLE" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "dIFFERENCE" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 2 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "130 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 130 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "115 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 115 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "10" # Item value + End KeyMap + End KeyMap + Key5 = "REGION3" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Not" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 1 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "118 -8" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 118 # Item values + V2_2 = -8 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "3" # Item value + End KeyMap + End KeyMap + End KeyMap + Key16 = "RESOLUTION" # Item name + Typ16 = 3 # Item data type (string) + Val16 = "0.001778" # Item value + Key17 = "SIZE" # Item name + Typ17 = 3 # Item data type (string) + Val17 = "0.000333 0.000278" # Item value + End KeyMap + Key3 = "SPECTRAL_PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DRESOLUTION" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 10 # Item values + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Spectral" # Item value + Key3 = "REFPOS" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "BARYCENTER" # Item value + Key4 = "RESOLUTION" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "10.0" # Item value + Key5 = "SPECTRAL" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1420.4" # Item value + Key6 = "UNIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "MHz" # Item value + End KeyMap + Key4 = "TIME_PROPS" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 30 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 1.2 # Item values + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 1 # Vector length + V2_1 = 1024 # Item values + Key3 = "DRESOLUTION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.80000000000000004 # Item values + Key4 = "ERROR" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1.2" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "tIMEiNTERVAL" # Item value + Key6 = "MJDSTART" # Item name + Typ6 = 2 # Item data type (double) + Val6 = 50083 # Item value + Key7 = "MJDSTOP" # Item name + Typ7 = 2 # Item data type (double) + Val7 = 50083.020833333336 # Item value + Key8 = "MJDTIME" # Item name + Typ8 = 2 # Item data type (double) + Val8 = 50814 # Item value + Key9 = "PIXSIZE" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "1024.0" # Item value + Key10 = "REFPOS" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "geocenter" # Item value + Key11 = "RESOLUTION" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "0.8" # Item value + Key12 = "START" # Item name + Typ12 = 3 # Item data type (string) + Val12 = "1996-01-01T00:00:00" # Item value + Key13 = "STOP" # Item name + Typ13 = 3 # Item data type (string) + Val13 = "1996-01-01T00:30:00" # Item value + Key14 = "TIME" # Item name + Typ14 = 3 # Item data type (string) + Val14 = "MJD 50814.0" # Item value + Key15 = "TIMESCALE" # Item name + Typ15 = 3 # Item data type (string) + Val15 = "tt" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/compound-with-time.out b/ast_tester/fixtures/stcs/compound-with-time.out new file mode 100644 index 00000000..c9daa62f --- /dev/null +++ b/ast_tester/fixtures/stcs/compound-with-time.out @@ -0,0 +1 @@ +TimeInterval TT geocenter 1996-01-01T00:00:00 1996-01-01T00:30:00 Time MJD 50814.0 Error 1.2 Resolution 0.8 PixSize 1024.0 Union ICRS GEOCENTER ( Circle 180 10 20 Circle 190 10 20 Intersection ( Circle 120 -10 20 Difference ( Circle 130 -10 20 Circle 115 -10 10 ) ) ) Position 179.0 -11.5 Error 0.000889 0.000889 Resolution 0.001778 Size 0.000333 0.000278 PixSize 0.000083 0.000083 Spectral BARYCENTER 1420.4 unit MHz Resolution 10.0 RedshiftInterval BARYCENTER VELOCITY OPTICAL 200 2300 Redshift 300 Resolution 0.7 PixSize 0.3 diff --git a/ast_tester/fixtures/stcs/compound-with-time.out-20 b/ast_tester/fixtures/stcs/compound-with-time.out-20 new file mode 100644 index 00000000..6e5cc44a --- /dev/null +++ b/ast_tester/fixtures/stcs/compound-with-time.out-20 @@ -0,0 +1,42 @@ +TimeInterval TT + geocenter + 1996-01-01T00:00:00 + 1996-01-01T00:30:00 + Time MJD 50814.0 + Error 1.2 + Resolution 0.8 + PixSize 1024.0 +Union ICRS GEOCENTER( + Circle 180 10 + 20 + Circle 190 10 + 20 + Intersection ( + Circle 120 + -10 20 + Difference ( + Circle + 130 -10 20 + Circle + 115 -10 10 + ) + ) + ) + Position 179.0 + -11.5 Error + 0.000889 0.000889 + Resolution + 0.001778 Size + 0.000333 0.000278 + PixSize 0.000083 + 0.000083 +Spectral BARYCENTER + 1420.4 unit MHz + Resolution 10.0 +RedshiftInterval + BARYCENTER + VELOCITY OPTICAL + 200 2300 + Redshift 300 + Resolution 0.7 + PixSize 0.3 diff --git a/ast_tester/fixtures/stcs/compound-with-time.props.native b/ast_tester/fixtures/stcs/compound-with-time.props.native new file mode 100644 index 00000000..220e19e4 --- /dev/null +++ b/ast_tester/fixtures/stcs/compound-with-time.props.native @@ -0,0 +1,359 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 22 # Total member count + Key1 = "DOPPLERDEF" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "optical" # Item value + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 1 # Vector length + V2_1 = 0.29999999999999999 # Item values + Key3 = "DRESOLUTION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.69999999999999996 # Item values + Key4 = "HILIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2300.0" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "rEDSHIFTiNTERVAL" # Item value + Key6 = "LOLIMIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "200.0" # Item value + Key7 = "PIXSIZE" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "0.3" # Item value + Key8 = "REDSHIFT" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "300.0" # Item value + Key9 = "REFPOS" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "barycenter" # Item value + Key10 = "RESOLUTION" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "0.7" # Item value + Key11 = "TYPE" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "velocity" # Item value + End KeyMap + Key2 = "SPACE_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 34 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 0.00088900000000000003 # Item values + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 8.2999999999999998e-05 # Item values + V2_2 = 8.2999999999999998e-05 + Key3 = "DPOSITION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 2 # Vector length + V3_1 = 179 # Item values + V3_2 = -11.5 + Key4 = "DRESOLUTION" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 1 # Vector length + V4_1 = 0.0017780000000000001 # Item values + Key5 = "DSIZE" # Item name + Typ5 = 2 # Item data type (double) + Nel5 = 2 # Vector length + V5_1 = 0.00033300000000000002 # Item values + V5_2 = 0.00027799999999999998 + Key6 = "ERROR" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "0.000889" # Item value + Key7 = "FRAME" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "ICRS" # Item value + Key8 = "ID" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "Union" # Item value + Key9 = "NREG" # Item name + Typ9 = 1 # Item data type (int) + Val9 = 3 # Item value + Key10 = "PIXSIZE" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "0.000083 0.000083" # Item value + Key11 = "POSITION" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "179.0 -11.5" # Item value + Key12 = "REFPOS" # Item name + Typ12 = 3 # Item data type (string) + Val12 = "GEOCENTER" # Item value + Key13 = "REGION1" # Item name + Typ13 = 4 # Item data type (AST Object) + Val13 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "180 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 180 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key14 = "REGION2" # Item name + Typ14 = 4 # Item data type (AST Object) + Val14 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "190 10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 190 # Item values + V2_2 = 10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key15 = "REGION3" # Item name + Typ15 = 4 # Item data type (AST Object) + Val15 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Intersection" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 3 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "120 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 120 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "cIRCLE" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "dIFFERENCE" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 2 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "130 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 130 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "20" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "115 -10" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 115 # Item values + V2_2 = -10 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "10" # Item value + End KeyMap + End KeyMap + Key5 = "REGION3" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Not" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 1 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "118 -8" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 118 # Item values + V2_2 = -8 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "3" # Item value + End KeyMap + End KeyMap + End KeyMap + Key16 = "RESOLUTION" # Item name + Typ16 = 3 # Item data type (string) + Val16 = "0.001778" # Item value + Key17 = "SIZE" # Item name + Typ17 = 3 # Item data type (string) + Val17 = "0.000333 0.000278" # Item value + End KeyMap + Key3 = "SPECTRAL_PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DRESOLUTION" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 10 # Item values + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Spectral" # Item value + Key3 = "REFPOS" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "BARYCENTER" # Item value + Key4 = "RESOLUTION" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "10.0" # Item value + Key5 = "SPECTRAL" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1420.4" # Item value + Key6 = "UNIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "MHz" # Item value + End KeyMap + Key4 = "TIME_PROPS" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 30 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 1.2 # Item values + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 1 # Vector length + V2_1 = 1024 # Item values + Key3 = "DRESOLUTION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.80000000000000004 # Item values + Key4 = "ERROR" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1.2" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "tIMEiNTERVAL" # Item value + Key6 = "MJDSTART" # Item name + Typ6 = 2 # Item data type (double) + Val6 = 50083 # Item value + Key7 = "MJDSTOP" # Item name + Typ7 = 2 # Item data type (double) + Val7 = 50083.020833333336 # Item value + Key8 = "MJDTIME" # Item name + Typ8 = 2 # Item data type (double) + Val8 = 50814 # Item value + Key9 = "PIXSIZE" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "1024.0" # Item value + Key10 = "REFPOS" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "geocenter" # Item value + Key11 = "RESOLUTION" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "0.8" # Item value + Key12 = "START" # Item name + Typ12 = 3 # Item data type (string) + Val12 = "1996-01-01T00:00:00" # Item value + Key13 = "STOP" # Item name + Typ13 = 3 # Item data type (string) + Val13 = "1996-01-01T00:30:00" # Item value + Key14 = "TIME" # Item name + Typ14 = 3 # Item data type (string) + Val14 = "MJD 50814.0" # Item value + Key15 = "TIMESCALE" # Item name + Typ15 = 3 # Item data type (string) + Val15 = "tt" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/compound-with-time.stcs b/ast_tester/fixtures/stcs/compound-with-time.stcs new file mode 100644 index 00000000..8a1d1003 --- /dev/null +++ b/ast_tester/fixtures/stcs/compound-with-time.stcs @@ -0,0 +1,24 @@ +tIMEiNTERVAL tt geocenter +1996-01-01T00:00:00 1996-01-01T00:30:00 +Time MJD 50814.0 Error 1.2 +Resolution 0.8 PixSize 1024.0 + +Union ICRS GEOCENTER + (Circle 180 10 20 + Circle 190 10 20 + Intersection ( + cIRCLE 120 -10 20 dIFFERENCE + ( Circle 130 -10 20 + Circle 115 -10 10 + ) + Not (Circle 118 -8 3) + ) + ) +Position 179.0 -11.5 Error 0.000889 +Resolution 0.001778 Size 0.000333 0.000278 +PixSize 0.000083 0.000083 +Spectral BARYCENTER 1420.4 unit MHz +rESOLUTION 10.0 +rEDSHIFTiNTERVAL barycenter velocity optical +200.0 2300.0 rEDSHIFT 300.0 +Resolution 0.7 PixSize 0.3 diff --git a/ast_tester/fixtures/stcs/compound-with-time.warnings b/ast_tester/fixtures/stcs/compound-with-time.warnings new file mode 100644 index 00000000..0643b031 --- /dev/null +++ b/ast_tester/fixtures/stcs/compound-with-time.warnings @@ -0,0 +1,2 @@ +AST only supports topocentric time frames, so 'TOPOCENTER' will be used in place of 'geocenter'. +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. diff --git a/ast_tester/fixtures/stcs/convex.error b/ast_tester/fixtures/stcs/convex.error new file mode 100644 index 00000000..bb6a2956 --- /dev/null +++ b/ast_tester/fixtures/stcs/convex.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): A Convex was found within an STC-S description ('Convex' regions are not yet supported by AST): Convex ICRS 0 diff --git a/ast_tester/fixtures/stcs/convex.stcs b/ast_tester/fixtures/stcs/convex.stcs new file mode 100644 index 00000000..ae3928bb --- /dev/null +++ b/ast_tester/fixtures/stcs/convex.stcs @@ -0,0 +1 @@ +Convex ICRS 0 0 1 0.5 0 1 0 0.5 diff --git a/ast_tester/fixtures/stcs/corpus.txt b/ast_tester/fixtures/stcs/corpus.txt new file mode 100644 index 00000000..8a7ddbe3 --- /dev/null +++ b/ast_tester/fixtures/stcs/corpus.txt @@ -0,0 +1,35 @@ +# The STC-S corpus: one row per document .stcs. +# Fields: moc=|moc=- stcs=yes|no [indent]; README.md has the layout. +# +# The sixteen documents of ast_tester/teststcschan.c, doc1 to doc16. +fred-unknown-word moc=- stcs=no # doc1; AST__BADIN for the word 'fred'; the stc-s crate stops at 'fred' +misspelt-keyword moc=8 stcs=yes # doc2; 'SpeCtralInterval' is matched without regard to case, with four warnings +stcs-ex1 moc=8 stcs=yes # doc3, the C demos' stcs-ex1.txt with its words in mixed case +time-spectral moc=- stcs=yes # doc4; no space sub-phrase +compound-with-time moc=8 stcs=yes # doc5; a compound space sub-phrase between time and spectral sub-phrases +compound-union moc=- stcs=yes # doc6; the moc crate refuses every Box (see adass2010-figure1) +two-axis-box moc=8 stcs=yes # doc7, what a Box or an Interval is written as +position-interval moc=8 stcs=yes # doc8 +position-interval-fillfactor moc=8 stcs=yes # doc9; the optional words before the limits +allsky moc=8 stcs=yes # doc10; a negated NullRegion; in CDS_MOC_EXCLUDED, as C's Moc of a Region covering the whole sky is empty +allsky-fillfactor moc=8 stcs=yes # doc11; in CDS_MOC_EXCLUDED, as C's Moc of a Region covering the whole sky is empty +union-allsky moc=8 stcs=yes # doc12; AllSky inside a compound region; in CDS_MOC_EXCLUDED, as C's Moc of a Region covering the whole sky is empty +circle-unit-m moc=- stcs=yes # doc13; AST__BADIN, a unit AST does not support for a SkyFrame; the moc crate refuses units other than degrees +position-interval-unit-m moc=- stcs=yes # doc14; as circle-unit-m, on a PositionInterval +circle-arcsec moc=- stcs=yes # doc15; the moc crate refuses units other than degrees +timeinterval-allsky moc=8 stcs=yes # doc16; read as an Interval whose spatial bounds are undefined; in CDS_MOC_EXCLUDED, as C's Moc of a Region covering the whole sky is empty +# +# The ADASS 2010 paper's Figure 1, and the same without its Box. +adass2010-figure1 moc=- stcs=yes indent # moc 0.19.3 refuses every Box: its visit_box reads the first BSIZE value for both sizes, so the semi-minor axis is never less than the semi-major one +adass2010-figure1-nobox moc=8 stcs=yes +# +# The shapes and paths the documents above do not reach. +ellipse moc=8 stcs=yes +polygon moc=8 stcs=yes # vertices counter-clockwise as seen from inside the sphere, as STC-S has them; the moc crate takes the smaller area whatever their order +position moc=- stcs=yes # a PointList; the moc crate refuses a simple position +convex moc=- stcs=yes # AST__BADIN: AST does not support a Convex, nor does the moc crate +not moc=8 stcs=yes # a negated Circle +nested-intersection-difference moc=- stcs=yes # an Intersection holding a Difference; the moc crate refuses every Box (see adass2010-figure1) +spectral-interval moc=- stcs=yes # no space sub-phrase +redshift-interval moc=- stcs=yes # no space sub-phrase +time-identifier moc=- stcs=yes # no space sub-phrase; a time sub-phrase starting with 'Time', which crashes the C library at 37f52a20 (stcschan.c:3715 has 'timeid = TIME_ID;' inside a comment); the expectations are the port's, checked against C with that line fixed (README.md) diff --git a/ast_tester/fixtures/stcs/ellipse.moc b/ast_tester/fixtures/stcs/ellipse.moc new file mode 100644 index 00000000..c6936463 --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse.moc @@ -0,0 +1,11 @@ +5/4964-4965 4976 +6/19770-19771 19774-19775 19868-19869 19910 19912-19913 19916 +7/79039 79272 79274-79275 79278 79380-79381 79383 79389 79457 79460-79461 79463 + 79481 79484-79485 79632 79634-79635 79644 79646 79656-79657 79660-79661 + 79668-79670 79672-79673 +8/316149-316151 316153 316155 316299 316302-316303 316314-316315 316318-316319 + 316362-316363 316366-316367 316378-316379 317094-317095 317116 317118-317119 + 317162 317529 317531 317553 317565 317825 317837 317848-317849 317851 317877 + 317920-317921 317923 317944-317945 317948-317949 318534 318552 318554-318555 + 318582 318588 318590-318591 318632-318633 318636-318637 318639 318648-318650 + 318652-318653 318684 318686 318696-318697 318700 318704-318706 diff --git a/ast_tester/fixtures/stcs/ellipse.native b/ast_tester/fixtures/stcs/ellipse.native new file mode 100644 index 00000000..cf565fbb --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse.native @@ -0,0 +1,96 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Ellipse # Elliptical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 3 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.2125604498099912 + X4 = 0.40928627672683887 + X5 = 0.20650195068650057 + X6 = 0.33144994233441527 + End PointSet + IsA Region # An area within a coordinate system + End Ellipse + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Ellipse" # Item value + Key5 = "POSANGLE" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "30" # Item value + Key6 = "RADIUS1" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "4" # Item value + Key7 = "RADIUS2" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "2" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/ellipse.out b/ast_tester/fixtures/stcs/ellipse.out new file mode 100644 index 00000000..e177fca3 --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse.out @@ -0,0 +1 @@ +Ellipse ICRS TOPOCENTER 10 20 4 2 30 diff --git a/ast_tester/fixtures/stcs/ellipse.out-20 b/ast_tester/fixtures/stcs/ellipse.out-20 new file mode 100644 index 00000000..bc7c0ea8 --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse.out-20 @@ -0,0 +1,3 @@ +Ellipse ICRS + TOPOCENTER 10 20 + 4 2 30 diff --git a/ast_tester/fixtures/stcs/ellipse.props.native b/ast_tester/fixtures/stcs/ellipse.props.native new file mode 100644 index 00000000..0be1a049 --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse.props.native @@ -0,0 +1,35 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Ellipse" # Item value + Key5 = "POSANGLE" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "30" # Item value + Key6 = "RADIUS1" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "4" # Item value + Key7 = "RADIUS2" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "2" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/ellipse.stcs b/ast_tester/fixtures/stcs/ellipse.stcs new file mode 100644 index 00000000..71324c49 --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse.stcs @@ -0,0 +1 @@ +Ellipse ICRS 10 20 4 2 30 diff --git a/ast_tester/fixtures/stcs/ellipse.warnings b/ast_tester/fixtures/stcs/ellipse.warnings new file mode 100644 index 00000000..29457709 --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/fred-unknown-word.error b/ast_tester/fixtures/stcs/fred-unknown-word.error new file mode 100644 index 00000000..3e29b36f --- /dev/null +++ b/ast_tester/fixtures/stcs/fred-unknown-word.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): Unsupported or irrelevant word 'fred' found in STC-S space sub-phrase: 'StartTime 1900-01-01 Circle ICRS 148.9 69.1 2.0 fr...'. diff --git a/ast_tester/fixtures/stcs/fred-unknown-word.stcs b/ast_tester/fixtures/stcs/fred-unknown-word.stcs new file mode 100644 index 00000000..eb9f4424 --- /dev/null +++ b/ast_tester/fixtures/stcs/fred-unknown-word.stcs @@ -0,0 +1,2 @@ +StartTime 1900-01-01 Circle ICRS 148.9 69.1 2.0 fred +SpectralInterval 4000 7000 unit Angstrom diff --git a/ast_tester/fixtures/stcs/misspelt-keyword.moc b/ast_tester/fixtures/stcs/misspelt-keyword.moc new file mode 100644 index 00000000..00cf5bfd --- /dev/null +++ b/ast_tester/fixtures/stcs/misspelt-keyword.moc @@ -0,0 +1,8 @@ +5/1901 +6/7582 7601 7603 7608-7609 7611-7612 +7/30317-30319 30332 30334-30335 30401 30403 30409-30411 30441 30452-30454 + 30456-30457 +8/121263 121267 121290-121291 121294-121295 121306-121307 121332 121334-121335 + 121609 121611 121633-121635 121761 121763 121772-121773 121820 121832-121834 + 121836 121840-121842 122024 122026 122368 122370 122376 122378 122400 122402 + 122408 diff --git a/ast_tester/fixtures/stcs/misspelt-keyword.native b/ast_tester/fixtures/stcs/misspelt-keyword.native new file mode 100644 index 00000000..3fdac67b --- /dev/null +++ b/ast_tester/fixtures/stcs/misspelt-keyword.native @@ -0,0 +1,273 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Prism # Region extrusion into higher dimensions +# Title = "4-d compound coordinate system" # Title of coordinate system +# Naxes = 4 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM" # Coordinate system domain +# Epoch = 1900.0005105653556 # Besselian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1900-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Wavelength" # Label for axis 4 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "Angstrom" # Units for axis 4 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "4-d compound coordinate system" # Title of coordinate system +# Naxes = 4 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1900-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Wavelength" # Label for axis 4 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "Angstrom" # Units for axis 4 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin CmpFrame # Compound coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1900.0005105653556 # Besselian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmOrg = 15020 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SkyFrame # Description of celestial coordinate system + Naxes = 2 # Number of coordinate axes + Epoch = 1900.0005105653556 # Besselian epoch of observation + System = "ICRS" # Coordinate system type + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description + End SkyFrame + End CmpFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1900.0005105653556 # Besselian epoch of observation + System = "WAVE" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "Angstrom" # Axis units + End Axis + IsA Frame # Coordinate system description + UWave = "Angstrom" # Preferred units for wavelength + End SpecFrame + End CmpFrame + RegAxes = 4 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin Prism # Region extrusion into higher dimensions +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Epoch = 1900.0005105653556 # Besselian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1900-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + RegAxes = 3 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin Interval # Axis intervals +# Title = "Modified Julian Date offset from 1900-01-01 00:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1900.0005105653556 # Besselian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1900-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin TimeFrame # Description of time coordinate system +# Title = "Modified Julian Date offset from 1900-01-01 00:00:00" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain + Epoch = 1900.0005105653556 # Besselian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1900-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description +# TmScl = "TAI" # Time scale + TmOrg = 15020 # Time offset + End TimeFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0 # Coordinate values... + End PointSet + IsA Region # An area within a coordinate system + End Interval + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 1900.0005105653556 # Besselian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain + Epoch = 1900.0005105653556 # Besselian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 2.5987952562195566 # Coordinate values... + X2 = 1.2060225131280815 + X3 = 2.6965053717930951 + X4 = 1.2049976384016876 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End Prism + RegionB = # Second component Region + Begin Box # Axis intervals +# Title = "Wavelength" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain +# Epoch = 1900.0005105653556 # Besselian epoch of observation +# Lbl1 = "Wavelength" # Label for axis 1 +# System = "WAVE" # Coordinate system type +# Uni1 = "Angstrom" # Units for axis 1 + IsA Frame # Coordinate system description + Closed = 1 # Boundary is inside + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 5500 # Coordinate values... + X2 = 7000 + End PointSet + IsA Region # An area within a coordinate system + End Box + End Prism + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "148.9 69.1" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 148.90000000000001 # Item values + V2_2 = 69.099999999999994 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Circle" # Item value + Key5 = "RADIUS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "2.0" # Item value + End KeyMap + Key2 = "SPECTRAL_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "HILIMIT" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "7000" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "SpeCtralInterval" # Item value + Key3 = "LOLIMIT" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "4000" # Item value + Key4 = "UNIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Angstrom" # Item value + End KeyMap + Key3 = "TIME_PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "StartTime" # Item value + Key2 = "MJDSTART" # Item name + Typ2 = 2 # Item data type (double) + Val2 = 15020 # Item value + Key3 = "START" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "1900-01-01" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/misspelt-keyword.out b/ast_tester/fixtures/stcs/misspelt-keyword.out new file mode 100644 index 00000000..0d6dca2a --- /dev/null +++ b/ast_tester/fixtures/stcs/misspelt-keyword.out @@ -0,0 +1 @@ +StartTime TAI TOPOCENTER 1900-01-01T00:00:00 Circle ICRS TOPOCENTER 148.9 69.1 2.0 SpectralInterval HELIOCENTER 4000 7000 unit Angstrom diff --git a/ast_tester/fixtures/stcs/misspelt-keyword.out-20 b/ast_tester/fixtures/stcs/misspelt-keyword.out-20 new file mode 100644 index 00000000..8a587d4e --- /dev/null +++ b/ast_tester/fixtures/stcs/misspelt-keyword.out-20 @@ -0,0 +1,10 @@ +StartTime TAI + TOPOCENTER + 1900-01-01T00:00:00 +Circle ICRS + TOPOCENTER 148.9 + 69.1 2.0 +SpectralInterval + HELIOCENTER 4000 + 7000 unit + Angstrom diff --git a/ast_tester/fixtures/stcs/misspelt-keyword.props.native b/ast_tester/fixtures/stcs/misspelt-keyword.props.native new file mode 100644 index 00000000..13e906be --- /dev/null +++ b/ast_tester/fixtures/stcs/misspelt-keyword.props.native @@ -0,0 +1,64 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "148.9 69.1" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 148.90000000000001 # Item values + V2_2 = 69.099999999999994 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Circle" # Item value + Key5 = "RADIUS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "2.0" # Item value + End KeyMap + Key2 = "SPECTRAL_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "HILIMIT" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "7000" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "SpeCtralInterval" # Item value + Key3 = "LOLIMIT" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "4000" # Item value + Key4 = "UNIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Angstrom" # Item value + End KeyMap + Key3 = "TIME_PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "StartTime" # Item value + Key2 = "MJDSTART" # Item name + Typ2 = 2 # Item data type (double) + Val2 = 15020 # Item value + Key3 = "START" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "1900-01-01" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/misspelt-keyword.stcs b/ast_tester/fixtures/stcs/misspelt-keyword.stcs new file mode 100644 index 00000000..a627a19a --- /dev/null +++ b/ast_tester/fixtures/stcs/misspelt-keyword.stcs @@ -0,0 +1,2 @@ +StartTime 1900-01-01 Circle ICRS 148.9 69.1 2.0 +SpeCtralInterval 4000 7000 unit Angstrom diff --git a/ast_tester/fixtures/stcs/misspelt-keyword.warnings b/ast_tester/fixtures/stcs/misspelt-keyword.warnings new file mode 100644 index 00000000..b46bd07c --- /dev/null +++ b/ast_tester/fixtures/stcs/misspelt-keyword.warnings @@ -0,0 +1,4 @@ +Time scale defaulting to 'TAI'. +AST only supports topocentric time frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. +Spectral reference position defaulting to 'HELIOCENTER' in an STC-S description. diff --git a/ast_tester/fixtures/stcs/nested-intersection-difference.native b/ast_tester/fixtures/stcs/nested-intersection-difference.native new file mode 100644 index 00000000..23d1d222 --- /dev/null +++ b/ast_tester/fixtures/stcs/nested-intersection-difference.native @@ -0,0 +1,357 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.26740240440955837 + X4 = 0.34898217986310309 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.20943951023931956 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.30230898944944501 + X4 = 0.34898217986310309 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin Polygon # Polygonal region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Negate = 1 # Region negated + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 4 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.19074762965766476 # Coordinate values... + X2 = 0.36646069702596229 + X3 = 0.22813139082097264 + X4 = 0.36646069702596218 + X5 = 0.22789544044363719 + X6 = 0.33156013155851111 + X7 = 0.19098358003500029 + X8 = 0.33156013155851105 + End PointSet + IsA Region # An area within a coordinate system + Order = 1 # Polygon uses STC vertex order convention + End Polygon + End CmpRegion + End CmpRegion + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Intersection" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 2 # Item value + Key4 = "REGION1" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "5" # Item value + End KeyMap + Key5 = "REGION2" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Difference" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 2 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "12 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 12 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "5" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "BSIZE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "2 2" # Item value + Key2 = "CENTRE" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "12 20" # Item value + Key3 = "DBSIZE" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 2 # Vector length + V3_1 = 2 # Item values + V3_2 = 2 + Key4 = "DCENTRE" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 2 # Vector length + V4_1 = 12 # Item values + V4_2 = 20 + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "Box" # Item value + End KeyMap + End KeyMap + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/nested-intersection-difference.out b/ast_tester/fixtures/stcs/nested-intersection-difference.out new file mode 100644 index 00000000..83f59c09 --- /dev/null +++ b/ast_tester/fixtures/stcs/nested-intersection-difference.out @@ -0,0 +1 @@ +Intersection ICRS TOPOCENTER ( Circle 10 20 5 Circle 12 20 5 Not ( Polygon 10.92903 20.99665 13.07097 20.99665 13.05745 18.997 10.94255 18.997 ) ) diff --git a/ast_tester/fixtures/stcs/nested-intersection-difference.out-20 b/ast_tester/fixtures/stcs/nested-intersection-difference.out-20 new file mode 100644 index 00000000..cd3882f6 --- /dev/null +++ b/ast_tester/fixtures/stcs/nested-intersection-difference.out-20 @@ -0,0 +1,12 @@ +Intersection ICRS + TOPOCENTER ( + Circle 10 20 5 + Circle 12 20 5 + Not ( + Polygon + 10.92903 20.99665 + 13.07097 20.99665 + 13.05745 18.997 + 10.94255 18.997 + ) + ) diff --git a/ast_tester/fixtures/stcs/nested-intersection-difference.props.native b/ast_tester/fixtures/stcs/nested-intersection-difference.props.native new file mode 100644 index 00000000..7ff3ce06 --- /dev/null +++ b/ast_tester/fixtures/stcs/nested-intersection-difference.props.native @@ -0,0 +1,106 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Intersection" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 2 # Item value + Key4 = "REGION1" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "5" # Item value + End KeyMap + Key5 = "REGION2" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Difference" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 2 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "12 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 12 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "5" # Item value + End KeyMap + Key4 = "REGION2" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "BSIZE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "2 2" # Item value + Key2 = "CENTRE" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "12 20" # Item value + Key3 = "DBSIZE" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 2 # Vector length + V3_1 = 2 # Item values + V3_2 = 2 + Key4 = "DCENTRE" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 2 # Vector length + V4_1 = 12 # Item values + V4_2 = 20 + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "Box" # Item value + End KeyMap + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/nested-intersection-difference.stcs b/ast_tester/fixtures/stcs/nested-intersection-difference.stcs new file mode 100644 index 00000000..fd1f3fdf --- /dev/null +++ b/ast_tester/fixtures/stcs/nested-intersection-difference.stcs @@ -0,0 +1,7 @@ +Intersection ICRS ( + Circle 10 20 5 + Difference ( + Circle 12 20 5 + Box 12 20 2 2 + ) +) diff --git a/ast_tester/fixtures/stcs/nested-intersection-difference.warnings b/ast_tester/fixtures/stcs/nested-intersection-difference.warnings new file mode 100644 index 00000000..29457709 --- /dev/null +++ b/ast_tester/fixtures/stcs/nested-intersection-difference.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/not.moc b/ast_tester/fixtures/stcs/not.moc new file mode 100644 index 00000000..bea1f9fd --- /dev/null +++ b/ast_tester/fixtures/stcs/not.moc @@ -0,0 +1,19 @@ +0/0-3 5-11 +1/16-18 +2/76 78-79 +4/1232-1233 1236-1237 1247 +5/4936 4938 4956-4957 4959-4960 4962 4968 4970-4971 4981 4983 4987 +6/19748-19750 19813 19833 19835 19876 19878-19879 19896 19898-19899 19902-19903 + 19921 19923 19929 19931 19946-19947 +7/79004 79024-79026 79032 79040-79041 79237 79248-79249 79251 79260-79261 79263 + 79328-79329 79331 79337 79339 79410 79416 79418-79419 79510 79562 79588 + 79590-79591 79602-79603 79606-79607 79721 79723 79771 79773-79775 79778-79779 + 79782-79783 +8/316020-316022 316024-316026 316108 316110 316136-316138 316168-316170 316172 + 316176-316178 316180-316181 316929 316932-316933 316944-316945 316947 316957 + 317000-317001 317003 317028-317029 317049 317141 317143 317320-317321 317323 + 317345 317504 317506 317512 317514 317536 317538 317544 317546 317632 + 317634-317635 317668 317670 318032 318034 318046 318242 318252 318254-318255 + 318358-318359 318725 318727 318733 318735 318757 318759 318765 318767 318853 + 318855 318861-318863 318889 318891 319063 319069-319071 319083 319089-319091 + 319122-319123 319125-319127 diff --git a/ast_tester/fixtures/stcs/not.native b/ast_tester/fixtures/stcs/not.native new file mode 100644 index 00000000..adbbb302 --- /dev/null +++ b/ast_tester/fixtures/stcs/not.native @@ -0,0 +1,103 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Negate = 1 # Region negated + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.26740240440955837 + X4 = 0.34898217986310309 + End PointSet + IsA Region # An area within a coordinate system + End Circle + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Not" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 1 # Item value + Key4 = "REGION1" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "5" # Item value + End KeyMap + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/not.out b/ast_tester/fixtures/stcs/not.out new file mode 100644 index 00000000..55e9eee8 --- /dev/null +++ b/ast_tester/fixtures/stcs/not.out @@ -0,0 +1 @@ +Not ICRS TOPOCENTER ( Circle 10 20 5 ) diff --git a/ast_tester/fixtures/stcs/not.out-20 b/ast_tester/fixtures/stcs/not.out-20 new file mode 100644 index 00000000..50b9cddf --- /dev/null +++ b/ast_tester/fixtures/stcs/not.out-20 @@ -0,0 +1,3 @@ +Not ICRS TOPOCENTER ( + Circle 10 20 5 + ) diff --git a/ast_tester/fixtures/stcs/not.props.native b/ast_tester/fixtures/stcs/not.props.native new file mode 100644 index 00000000..09413146 --- /dev/null +++ b/ast_tester/fixtures/stcs/not.props.native @@ -0,0 +1,43 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Not" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 1 # Item value + Key4 = "REGION1" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "5" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/not.stcs b/ast_tester/fixtures/stcs/not.stcs new file mode 100644 index 00000000..d033fb73 --- /dev/null +++ b/ast_tester/fixtures/stcs/not.stcs @@ -0,0 +1 @@ +Not ICRS ( Circle 10 20 5 ) diff --git a/ast_tester/fixtures/stcs/not.warnings b/ast_tester/fixtures/stcs/not.warnings new file mode 100644 index 00000000..29457709 --- /dev/null +++ b/ast_tester/fixtures/stcs/not.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/polygon.moc b/ast_tester/fixtures/stcs/polygon.moc new file mode 100644 index 00000000..fc151ef1 --- /dev/null +++ b/ast_tester/fixtures/stcs/polygon.moc @@ -0,0 +1,23 @@ +4/1233 1236 +5/4589-4591 4602 4929 4931 4940-4941 4943 4952 +6/18334 18349-18351 18353-18355 18402 18414 19713-19715 19721 19749 19769 19794 + 19800-19802 19812-19814 19816-19818 19861 +7/73325-73327 73330-73331 73340 73342-73343 73373-73375 73389-73391 73393-73395 + 73409-73411 73600 73602-73603 73612 73614-73615 73648 73650-73651 73660 + 73662-73663 78173 78849-78851 78881 78893 78993 79005 79073 79085 79168 + 79170-79171 79180 79182-79183 79212 79216 79260 79276 79280 79296 79441 79616 +8/293277-293279 293293-293295 293297-293299 293313-293316 293318-293319 293336 + 293338-293339 293364 293366-293367 293469-293471 293485-293487 293489-293491 + 293533-293535 293549-293551 293553-293555 293569-293571 293633-293635 294056 + 294058-294059 294404 294406-294407 294424 294426-294427 294452 294454-294455 + 294504 294506-294507 294596 294598-294599 294616 294618-294619 294644 + 294646-294647 294824 294826-294827 312669-312671 312689 312691 312700-312701 + 312703 315393-315395 315520-315521 315523 315532-315533 315535 315568-315569 + 315571 315580-315581 315583 315968-315969 315971 315980-315981 315983 + 316016-316017 316019 316028-316029 316031 316288-316289 316291 316300-316301 + 316303 316336-316337 316339 316348-316349 316351 316676 316678-316679 316696 + 316698-316699 316724 316726-316727 316776 316778-316779 316852-316854 + 316856-316858 316868 316870 316872-316874 317044-317046 317048-317050 + 317108-317110 317112-317114 317124-317126 317128-317130 317188-317190 + 317192-317194 317760-317761 317763 317772-317773 317775 317808-317809 + 317811-317814 318468-318470 318472-318474 diff --git a/ast_tester/fixtures/stcs/polygon.native b/ast_tester/fixtures/stcs/polygon.native new file mode 100644 index 00000000..2e576230 --- /dev/null +++ b/ast_tester/fixtures/stcs/polygon.native @@ -0,0 +1,96 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Polygon # Polygonal region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 4 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.17453292519943295 + X3 = 0.17453292519943295 + X4 = 0.3490658503988659 + X5 = 0.3490658503988659 + X6 = 0.3490658503988659 + X7 = 0.3490658503988659 + X8 = 0.17453292519943295 + End PointSet + IsA Region # An area within a coordinate system + Order = 1 # Polygon uses STC vertex order convention + End Polygon + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "DVERTICES" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 8 # Vector length + V1_1 = 10 # Item values + V1_2 = 10 + V1_3 = 10 + V1_4 = 20 + V1_5 = 20 + V1_6 = 20 + V1_7 = 20 + V1_8 = 10 + Key2 = "FRAME" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "ICRS" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Polygon" # Item value + Key4 = "VERTICES" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "10 10 10 20 20 20 20 10" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/polygon.out b/ast_tester/fixtures/stcs/polygon.out new file mode 100644 index 00000000..223bf537 --- /dev/null +++ b/ast_tester/fixtures/stcs/polygon.out @@ -0,0 +1 @@ +Polygon ICRS TOPOCENTER 10 10 10 20 20 20 20 10 diff --git a/ast_tester/fixtures/stcs/polygon.out-20 b/ast_tester/fixtures/stcs/polygon.out-20 new file mode 100644 index 00000000..39e8bb4a --- /dev/null +++ b/ast_tester/fixtures/stcs/polygon.out-20 @@ -0,0 +1,3 @@ +Polygon ICRS + TOPOCENTER 10 10 + 10 20 20 20 20 10 diff --git a/ast_tester/fixtures/stcs/polygon.props.native b/ast_tester/fixtures/stcs/polygon.props.native new file mode 100644 index 00000000..f534a203 --- /dev/null +++ b/ast_tester/fixtures/stcs/polygon.props.native @@ -0,0 +1,32 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "DVERTICES" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 8 # Vector length + V1_1 = 10 # Item values + V1_2 = 10 + V1_3 = 10 + V1_4 = 20 + V1_5 = 20 + V1_6 = 20 + V1_7 = 20 + V1_8 = 10 + Key2 = "FRAME" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "ICRS" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Polygon" # Item value + Key4 = "VERTICES" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "10 10 10 20 20 20 20 10" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/polygon.stcs b/ast_tester/fixtures/stcs/polygon.stcs new file mode 100644 index 00000000..f567e73c --- /dev/null +++ b/ast_tester/fixtures/stcs/polygon.stcs @@ -0,0 +1 @@ +Polygon ICRS 10 10 10 20 20 20 20 10 diff --git a/ast_tester/fixtures/stcs/polygon.warnings b/ast_tester/fixtures/stcs/polygon.warnings new file mode 100644 index 00000000..29457709 --- /dev/null +++ b/ast_tester/fixtures/stcs/polygon.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/position-interval-fillfactor.moc b/ast_tester/fixtures/stcs/position-interval-fillfactor.moc new file mode 100644 index 00000000..7f8e88a7 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval-fillfactor.moc @@ -0,0 +1,29 @@ +3/34 +4/129-131 134 140-142 161 1245 +5/174-175 513-515 528 530-531 540 542-543 572-574 608 610 640-641 643 652-653 + 656-658 4957-4959 4977 4979 4988-4989 4991 +6/685-687 689-692 694-695 744 746-747 2049-2051 2116 2118-2119 2136 2138-2139 + 2164 2166-2167 2300 2344 2346-2347 2436 2438-2439 2444 2464 2569 2597 2617 + 2620 2636 2640 2656 19805-19807 19821-19823 19825-19827 19905-19907 19913 + 19941 19961 20309 +7/2669-2671 2682 2717-2719 2733-2735 2737-2739 2753-2755 2774 2954 2982 3002 + 8193-8195 8470 8522 8550 8570 8662 9204 9208 9354 9382 9402 9750 9780 9784 + 9860 9864 10273 10285 10385 10397 10465 10477 10484 10488 10548 10552 10564 + 10568 10628 10632 79197-79199 79213-79215 79217-79219 79261-79263 79277-79279 + 79281-79283 79297-79299 79453 79617-79619 79649 79661 79761 79773 79841 79853 + 81233 81245 +8/10671 10675 10722 10734 10847 10863 10867 10911 10927 10931 10947 11011 11090 + 11102 11810 11822 11922 11934 12002 12014 32771 33874 33886 34082 34094 34194 + 34206 34274 34286 34642 34654 36820 36824 36836 36840 37410 37422 37522 37534 + 37602 37614 38994 39006 39124 39128 39140 39144 39202 39208 39444 39448 39460 + 39464 41088-41089 41091 41100-41101 41103 41136-41137 41139 41148-41149 41151 + 41536-41537 41539 41548-41549 41551 41584-41585 41587 41596-41597 41599 + 41856-41857 41859 41868-41869 41871 41904-41905 41907 41916-41917 41940 41944 + 41956 41960 42196 42200 42212 42216 42260 42264 42276 42280 42516 42520 42532 + 42536 316767 316783 316787 316831 316847 316851 316867 317023 317039 317043 + 317087 317103 317107 317123 317187 317791 317820-317821 317823 318467 + 318592-318593 318595 318604-318605 318607 318640-318641 318643 318652-318653 + 318655 319040-319041 319043 319052-319053 319055 319088-319089 319091 + 319100-319101 319103 319360-319361 319363 319372-319373 319375 319408-319409 + 319411 319420-319421 319423 324928-324929 324931 324940-324941 324943 + 324976-324977 324979 324988-324989 324991 diff --git a/ast_tester/fixtures/stcs/position-interval-fillfactor.native b/ast_tester/fixtures/stcs/position-interval-fillfactor.native new file mode 100644 index 00000000..bd68c292 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval-fillfactor.native @@ -0,0 +1,100 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Box # Axis intervals +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Fill = 0.5 # Region fill factor + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.3490658503988659 # Coordinate values... + X2 = 0.52359877559829882 + X3 = 0.52359877559829882 + X4 = 0.69813170079773179 + End PointSet + IsA Region # An area within a coordinate system + End Box + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 16 # Total member count + Key1 = "DHILIMIT" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 30 # Item values + V1_2 = 40 + Key2 = "DLOLIMIT" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FILLFACTOR" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "0.5" # Item value + Key4 = "FRAME" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "ICRS" # Item value + Key5 = "HILIMIT" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "30 40" # Item value + Key6 = "ID" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "PositionInterval" # Item value + Key7 = "LOLIMIT" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "10 20" # Item value + Key8 = "REFPOS" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "GEOCENTER" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/position-interval-fillfactor.out b/ast_tester/fixtures/stcs/position-interval-fillfactor.out new file mode 100644 index 00000000..86ce77e1 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval-fillfactor.out @@ -0,0 +1 @@ +PositionInterval fillfactor 0.5 ICRS GEOCENTER 10 20 30 40 diff --git a/ast_tester/fixtures/stcs/position-interval-fillfactor.out-20 b/ast_tester/fixtures/stcs/position-interval-fillfactor.out-20 new file mode 100644 index 00000000..eb78d9b1 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval-fillfactor.out-20 @@ -0,0 +1,4 @@ +PositionInterval + fillfactor 0.5 + ICRS GEOCENTER 10 + 20 30 40 diff --git a/ast_tester/fixtures/stcs/position-interval-fillfactor.props.native b/ast_tester/fixtures/stcs/position-interval-fillfactor.props.native new file mode 100644 index 00000000..41b79f01 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval-fillfactor.props.native @@ -0,0 +1,40 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 16 # Total member count + Key1 = "DHILIMIT" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 30 # Item values + V1_2 = 40 + Key2 = "DLOLIMIT" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FILLFACTOR" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "0.5" # Item value + Key4 = "FRAME" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "ICRS" # Item value + Key5 = "HILIMIT" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "30 40" # Item value + Key6 = "ID" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "PositionInterval" # Item value + Key7 = "LOLIMIT" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "10 20" # Item value + Key8 = "REFPOS" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "GEOCENTER" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/position-interval-fillfactor.stcs b/ast_tester/fixtures/stcs/position-interval-fillfactor.stcs new file mode 100644 index 00000000..6aff8afc --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval-fillfactor.stcs @@ -0,0 +1 @@ +PositionInterval fillfactor 0.5 ICRS GEOCENTER 10 20 30 40 diff --git a/ast_tester/fixtures/stcs/position-interval-fillfactor.warnings b/ast_tester/fixtures/stcs/position-interval-fillfactor.warnings new file mode 100644 index 00000000..12eb0cf0 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval-fillfactor.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. diff --git a/ast_tester/fixtures/stcs/position-interval-unit-m.error b/ast_tester/fixtures/stcs/position-interval-unit-m.error new file mode 100644 index 00000000..5bb23b04 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval-unit-m.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): Unsupported units (m) for a spherical co-ordinate system within an STC-S description. diff --git a/ast_tester/fixtures/stcs/position-interval-unit-m.stcs b/ast_tester/fixtures/stcs/position-interval-unit-m.stcs new file mode 100644 index 00000000..fb5d0410 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval-unit-m.stcs @@ -0,0 +1 @@ +PositionInterval ICRS 10 20 30 40 unit m diff --git a/ast_tester/fixtures/stcs/position-interval.moc b/ast_tester/fixtures/stcs/position-interval.moc new file mode 100644 index 00000000..7f8e88a7 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval.moc @@ -0,0 +1,29 @@ +3/34 +4/129-131 134 140-142 161 1245 +5/174-175 513-515 528 530-531 540 542-543 572-574 608 610 640-641 643 652-653 + 656-658 4957-4959 4977 4979 4988-4989 4991 +6/685-687 689-692 694-695 744 746-747 2049-2051 2116 2118-2119 2136 2138-2139 + 2164 2166-2167 2300 2344 2346-2347 2436 2438-2439 2444 2464 2569 2597 2617 + 2620 2636 2640 2656 19805-19807 19821-19823 19825-19827 19905-19907 19913 + 19941 19961 20309 +7/2669-2671 2682 2717-2719 2733-2735 2737-2739 2753-2755 2774 2954 2982 3002 + 8193-8195 8470 8522 8550 8570 8662 9204 9208 9354 9382 9402 9750 9780 9784 + 9860 9864 10273 10285 10385 10397 10465 10477 10484 10488 10548 10552 10564 + 10568 10628 10632 79197-79199 79213-79215 79217-79219 79261-79263 79277-79279 + 79281-79283 79297-79299 79453 79617-79619 79649 79661 79761 79773 79841 79853 + 81233 81245 +8/10671 10675 10722 10734 10847 10863 10867 10911 10927 10931 10947 11011 11090 + 11102 11810 11822 11922 11934 12002 12014 32771 33874 33886 34082 34094 34194 + 34206 34274 34286 34642 34654 36820 36824 36836 36840 37410 37422 37522 37534 + 37602 37614 38994 39006 39124 39128 39140 39144 39202 39208 39444 39448 39460 + 39464 41088-41089 41091 41100-41101 41103 41136-41137 41139 41148-41149 41151 + 41536-41537 41539 41548-41549 41551 41584-41585 41587 41596-41597 41599 + 41856-41857 41859 41868-41869 41871 41904-41905 41907 41916-41917 41940 41944 + 41956 41960 42196 42200 42212 42216 42260 42264 42276 42280 42516 42520 42532 + 42536 316767 316783 316787 316831 316847 316851 316867 317023 317039 317043 + 317087 317103 317107 317123 317187 317791 317820-317821 317823 318467 + 318592-318593 318595 318604-318605 318607 318640-318641 318643 318652-318653 + 318655 319040-319041 319043 319052-319053 319055 319088-319089 319091 + 319100-319101 319103 319360-319361 319363 319372-319373 319375 319408-319409 + 319411 319420-319421 319423 324928-324929 324931 324940-324941 324943 + 324976-324977 324979 324988-324989 324991 diff --git a/ast_tester/fixtures/stcs/position-interval.native b/ast_tester/fixtures/stcs/position-interval.native new file mode 100644 index 00000000..c49216fa --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval.native @@ -0,0 +1,93 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Box # Axis intervals +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.3490658503988659 # Coordinate values... + X2 = 0.52359877559829882 + X3 = 0.52359877559829882 + X4 = 0.69813170079773179 + End PointSet + IsA Region # An area within a coordinate system + End Box + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DHILIMIT" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 30 # Item values + V1_2 = 40 + Key2 = "DLOLIMIT" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "HILIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "30 40" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "PositionInterval" # Item value + Key6 = "LOLIMIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "10 20" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/position-interval.out b/ast_tester/fixtures/stcs/position-interval.out new file mode 100644 index 00000000..87849215 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval.out @@ -0,0 +1 @@ +PositionInterval ICRS TOPOCENTER 10 20 30 40 diff --git a/ast_tester/fixtures/stcs/position-interval.out-20 b/ast_tester/fixtures/stcs/position-interval.out-20 new file mode 100644 index 00000000..d111cce0 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval.out-20 @@ -0,0 +1,3 @@ +PositionInterval + ICRS TOPOCENTER + 10 20 30 40 diff --git a/ast_tester/fixtures/stcs/position-interval.props.native b/ast_tester/fixtures/stcs/position-interval.props.native new file mode 100644 index 00000000..e8057a19 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval.props.native @@ -0,0 +1,34 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DHILIMIT" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 30 # Item values + V1_2 = 40 + Key2 = "DLOLIMIT" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "HILIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "30 40" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "PositionInterval" # Item value + Key6 = "LOLIMIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "10 20" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/position-interval.stcs b/ast_tester/fixtures/stcs/position-interval.stcs new file mode 100644 index 00000000..f2045ad8 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval.stcs @@ -0,0 +1 @@ +PositionInterval ICRS 10 20 30 40 diff --git a/ast_tester/fixtures/stcs/position-interval.warnings b/ast_tester/fixtures/stcs/position-interval.warnings new file mode 100644 index 00000000..29457709 --- /dev/null +++ b/ast_tester/fixtures/stcs/position-interval.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/position.native b/ast_tester/fixtures/stcs/position.native new file mode 100644 index 00000000..44e21429 --- /dev/null +++ b/ast_tester/fixtures/stcs/position.native @@ -0,0 +1,133 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin PointList # Collection of points +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + End PointSet + IsA Region # An area within a coordinate system + End PointList + Key2 = "COORDS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin PointList # Collection of points +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + End PointSet + IsA Region # An area within a coordinate system + End PointList + Key3 = "PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "DPOSITION" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 10 # Item values + V1_2 = 20 + Key2 = "FRAME" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "ICRS" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Position" # Item value + Key4 = "POSITION" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "10 20" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/position.out b/ast_tester/fixtures/stcs/position.out new file mode 100644 index 00000000..f6eef1c2 --- /dev/null +++ b/ast_tester/fixtures/stcs/position.out @@ -0,0 +1 @@ +Position ICRS TOPOCENTER 10 20 10 20 diff --git a/ast_tester/fixtures/stcs/position.out-20 b/ast_tester/fixtures/stcs/position.out-20 new file mode 100644 index 00000000..48f9d56f --- /dev/null +++ b/ast_tester/fixtures/stcs/position.out-20 @@ -0,0 +1,3 @@ +Position ICRS + TOPOCENTER 10 20 + 10 20 diff --git a/ast_tester/fixtures/stcs/position.props.native b/ast_tester/fixtures/stcs/position.props.native new file mode 100644 index 00000000..8e789d0c --- /dev/null +++ b/ast_tester/fixtures/stcs/position.props.native @@ -0,0 +1,26 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "DPOSITION" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 10 # Item values + V1_2 = 20 + Key2 = "FRAME" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "ICRS" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Position" # Item value + Key4 = "POSITION" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "10 20" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/position.stcs b/ast_tester/fixtures/stcs/position.stcs new file mode 100644 index 00000000..53c2a8db --- /dev/null +++ b/ast_tester/fixtures/stcs/position.stcs @@ -0,0 +1 @@ +Position ICRS 10 20 diff --git a/ast_tester/fixtures/stcs/position.warnings b/ast_tester/fixtures/stcs/position.warnings new file mode 100644 index 00000000..29457709 --- /dev/null +++ b/ast_tester/fixtures/stcs/position.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/redshift-interval.native b/ast_tester/fixtures/stcs/redshift-interval.native new file mode 100644 index 00000000..774c9882 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-interval.native @@ -0,0 +1,76 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Box # Axis intervals +# Title = "Optical velocity (Barycentric), rest frequency = 100000 GHz" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Optical velocity" # Label for axis 1 +# System = "VOPT" # Coordinate system type +# Uni1 = "km/s" # Units for axis 1 + IsA Frame # Coordinate system description + Closed = 1 # Boundary is inside + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SpecFrame # Description of spectral coordinate system +# Title = "Optical velocity (Barycentric), rest frequency = 100000 GHz" # Title of coordinate system + Naxes = 1 # Number of coordinate axes + Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Optical velocity" # Label for axis 1 + System = "VOPT" # Coordinate system type +# Uni1 = "km/s" # Units for axis 1 + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "km/s" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UVopt = "km/s" # Preferred units for optical velocity + End SpecFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 1250 # Coordinate values... + X2 = 2300 + End PointSet + IsA Region # An area within a coordinate system + End Box + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DOPPLERDEF" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "OPTICAL" # Item value + Key2 = "HILIMIT" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "2300" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "RedshiftInterval" # Item value + Key4 = "LOLIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "200" # Item value + Key5 = "REFPOS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "BARYCENTER" # Item value + Key6 = "TYPE" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "VELOCITY" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/redshift-interval.out b/ast_tester/fixtures/stcs/redshift-interval.out new file mode 100644 index 00000000..7953fd5c --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-interval.out @@ -0,0 +1 @@ +RedshiftInterval BARYCENTER VELOCITY OPTICAL 200 2300 diff --git a/ast_tester/fixtures/stcs/redshift-interval.out-20 b/ast_tester/fixtures/stcs/redshift-interval.out-20 new file mode 100644 index 00000000..259cabc6 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-interval.out-20 @@ -0,0 +1,4 @@ +RedshiftInterval + BARYCENTER + VELOCITY OPTICAL + 200 2300 diff --git a/ast_tester/fixtures/stcs/redshift-interval.props.native b/ast_tester/fixtures/stcs/redshift-interval.props.native new file mode 100644 index 00000000..cf9b2c83 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-interval.props.native @@ -0,0 +1,29 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DOPPLERDEF" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "OPTICAL" # Item value + Key2 = "HILIMIT" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "2300" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "RedshiftInterval" # Item value + Key4 = "LOLIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "200" # Item value + Key5 = "REFPOS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "BARYCENTER" # Item value + Key6 = "TYPE" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "VELOCITY" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/redshift-interval.stcs b/ast_tester/fixtures/stcs/redshift-interval.stcs new file mode 100644 index 00000000..4591f61c --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-interval.stcs @@ -0,0 +1 @@ +RedshiftInterval BARYCENTER VELOCITY OPTICAL 200 2300 diff --git a/ast_tester/fixtures/stcs/redshift-interval.warnings b/ast_tester/fixtures/stcs/redshift-interval.warnings new file mode 100644 index 00000000..e69de29b diff --git a/ast_tester/fixtures/stcs/spectral-interval.native b/ast_tester/fixtures/stcs/spectral-interval.native new file mode 100644 index 00000000..992f7df3 --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-interval.native @@ -0,0 +1,70 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Box # Axis intervals +# Title = "Wavelength" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Wavelength" # Label for axis 1 +# System = "WAVE" # Coordinate system type +# Uni1 = "Angstrom" # Units for axis 1 + IsA Frame # Coordinate system description + Closed = 1 # Boundary is inside + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SpecFrame # Description of spectral coordinate system +# Title = "Wavelength" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Wavelength" # Label for axis 1 + System = "WAVE" # Coordinate system type +# Uni1 = "Angstrom" # Units for axis 1 + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "Angstrom" # Axis units + End Axis + IsA Frame # Coordinate system description +# SoR = "Heliocentric" # Standard of rest + UWave = "Angstrom" # Preferred units for wavelength + End SpecFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 5500 # Coordinate values... + X2 = 7000 + End PointSet + IsA Region # An area within a coordinate system + End Box + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPECTRAL_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "HILIMIT" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "7000" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "SpectralInterval" # Item value + Key3 = "LOLIMIT" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "4000" # Item value + Key4 = "UNIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Angstrom" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/spectral-interval.out b/ast_tester/fixtures/stcs/spectral-interval.out new file mode 100644 index 00000000..96d529ef --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-interval.out @@ -0,0 +1 @@ +SpectralInterval HELIOCENTER 4000 7000 unit Angstrom diff --git a/ast_tester/fixtures/stcs/spectral-interval.out-20 b/ast_tester/fixtures/stcs/spectral-interval.out-20 new file mode 100644 index 00000000..30568608 --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-interval.out-20 @@ -0,0 +1,4 @@ +SpectralInterval + HELIOCENTER 4000 + 7000 unit + Angstrom diff --git a/ast_tester/fixtures/stcs/spectral-interval.props.native b/ast_tester/fixtures/stcs/spectral-interval.props.native new file mode 100644 index 00000000..c34c7f6c --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-interval.props.native @@ -0,0 +1,23 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPECTRAL_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "HILIMIT" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "7000" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "SpectralInterval" # Item value + Key3 = "LOLIMIT" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "4000" # Item value + Key4 = "UNIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Angstrom" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/spectral-interval.stcs b/ast_tester/fixtures/stcs/spectral-interval.stcs new file mode 100644 index 00000000..404560f1 --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-interval.stcs @@ -0,0 +1 @@ +SpectralInterval 4000 7000 unit Angstrom diff --git a/ast_tester/fixtures/stcs/spectral-interval.warnings b/ast_tester/fixtures/stcs/spectral-interval.warnings new file mode 100644 index 00000000..9d753ef8 --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-interval.warnings @@ -0,0 +1 @@ +Spectral reference position defaulting to 'HELIOCENTER' in an STC-S description. diff --git a/ast_tester/fixtures/stcs/stcs-ex1.moc b/ast_tester/fixtures/stcs/stcs-ex1.moc new file mode 100644 index 00000000..5234f560 --- /dev/null +++ b/ast_tester/fixtures/stcs/stcs-ex1.moc @@ -0,0 +1,2 @@ +7/101607 101612-101613 101624 +8/406425-406427 406457 406460-406461 406472 406474 406504 diff --git a/ast_tester/fixtures/stcs/stcs-ex1.native b/ast_tester/fixtures/stcs/stcs-ex1.native new file mode 100644 index 00000000..ec2810ac --- /dev/null +++ b/ast_tester/fixtures/stcs/stcs-ex1.native @@ -0,0 +1,899 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Prism # Region extrusion into higher dimensions +# Title = "5-d compound coordinate system" # Title of coordinate system +# Naxes = 5 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM-REDSHIFT" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Frequency" # Label for axis 4 +# Lbl5 = "Optical velocity" # Label for axis 5 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "MHz" # Units for axis 4 +# Uni5 = "km/s" # Units for axis 5 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "5-d compound coordinate system" # Title of coordinate system +# Naxes = 5 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM-REDSHIFT" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Frequency" # Label for axis 4 +# Lbl5 = "Optical velocity" # Label for axis 5 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "MHz" # Units for axis 4 +# Uni5 = "km/s" # Units for axis 5 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin CmpFrame # Compound coordinate system description + FrameA = # First component Frame + Begin CmpFrame # Compound coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SkyFrame # Description of celestial coordinate system + Naxes = 2 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "ICRS" # Coordinate system type + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description + End SkyFrame + End CmpFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "FREQ" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "MHz" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UFreq = "MHz" # Preferred units for frequency + End SpecFrame + End CmpFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Domain = "REDSHIFT" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "VOPT" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "km/s" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UVopt = "km/s" # Preferred units for optical velocity + End SpecFrame + End CmpFrame + RegAxes = 5 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin Prism # Region extrusion into higher dimensions +# Title = "4-d compound coordinate system" # Title of coordinate system +# Naxes = 4 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Frequency" # Label for axis 4 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "MHz" # Units for axis 4 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + RegAxes = 4 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin Prism # Region extrusion into higher dimensions +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SkyFrame # Description of celestial coordinate system + Naxes = 2 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "ICRS" # Coordinate system type + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description + End SkyFrame + End CmpFrame + RegAxes = 3 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin Box # Axis intervals +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Closed = 1 # Boundary is inside + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin TimeFrame # Description of time coordinate system +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.010416666667879326 # Coordinate values... + X2 = 0.020833333335758653 + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin TimeFrame # Description of time coordinate system +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.010416666667879326 # Coordinate values... + X2 = 0.010430555556768216 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End Box + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 3.12413936106985 # Coordinate values... + X2 = -0.2007128639793479 + X3 = 3.1330447874006384 + X4 = -0.20071270845637373 + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 3.12413936106985 # Coordinate values... + X2 = -0.2007128639793479 + X3 = 3.1241551949160744 + X4 = -0.20069734797754463 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End Circle + End Prism + RegionB = # Second component Region + Begin PointList # Collection of points +# Title = "Frequency (Barycentric)" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Frequency" # Label for axis 1 +# System = "FREQ" # Coordinate system type +# Uni1 = "MHz" # Units for axis 1 + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SpecFrame # Description of spectral coordinate system +# Title = "Frequency (Barycentric)" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Frequency" # Label for axis 1 + System = "FREQ" # Coordinate system type +# Uni1 = "MHz" # Units for axis 1 + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "MHz" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UFreq = "MHz" # Preferred units for frequency + End SpecFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 1420.4000000000001 # Coordinate values... + End PointSet + IsA Region # An area within a coordinate system + End PointList + End Prism + RegionB = # Second component Region + Begin Box # Axis intervals +# Title = "Optical velocity (Barycentric), rest frequency = 100000 GHz" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Optical velocity" # Label for axis 1 +# System = "VOPT" # Coordinate system type +# Uni1 = "km/s" # Units for axis 1 + IsA Frame # Coordinate system description + Closed = 1 # Boundary is inside + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 1250 # Coordinate values... + X2 = 2300 + End PointSet + IsA Region # An area within a coordinate system + End Box + End Prism + Key2 = "COORDS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin Prism # Region extrusion into higher dimensions +# Title = "5-d compound coordinate system" # Title of coordinate system +# Naxes = 5 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM-REDSHIFT" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Frequency" # Label for axis 4 +# Lbl5 = "Optical velocity" # Label for axis 5 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "MHz" # Units for axis 4 +# Uni5 = "km/s" # Units for axis 5 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "5-d compound coordinate system" # Title of coordinate system +# Naxes = 5 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM-REDSHIFT" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Frequency" # Label for axis 4 +# Lbl5 = "Optical velocity" # Label for axis 5 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "MHz" # Units for axis 4 +# Uni5 = "km/s" # Units for axis 5 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin CmpFrame # Compound coordinate system description + FrameA = # First component Frame + Begin CmpFrame # Compound coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SkyFrame # Description of celestial coordinate system + Naxes = 2 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "ICRS" # Coordinate system type + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description + End SkyFrame + End CmpFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "FREQ" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "MHz" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UFreq = "MHz" # Preferred units for frequency + End SpecFrame + End CmpFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Domain = "REDSHIFT" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "VOPT" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "km/s" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UVopt = "km/s" # Preferred units for optical velocity + End SpecFrame + End CmpFrame + RegAxes = 5 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin PointList # Collection of points +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SkyFrame # Description of celestial coordinate system + Naxes = 2 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "ICRS" # Coordinate system type + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description + End SkyFrame + End CmpFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 3 # Number of coordinates per point + X1 = 731 # Coordinate values... + X2 = 3.12413936106985 + X3 = -0.2007128639793479 + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SkyFrame # Description of celestial coordinate system + Naxes = 2 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "ICRS" # Coordinate system type + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description + End SkyFrame + End CmpFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 3 # Number of coordinates per point + X1 = 731 # Coordinate values... + X2 = 3.12413936106985 + X3 = -0.2007128639793479 + X4 = 731.00001388888893 + X5 = 3.124155194916074 + X6 = -0.20069734795279148 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End PointList + RegionB = # Second component Region + Begin PointList # Collection of points +# Title = "2-d compound coordinate system" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SPECTRUM-REDSHIFT" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Frequency" # Label for axis 1 +# Lbl2 = "Optical velocity" # Label for axis 2 +# System = "Compound" # Coordinate system type +# Uni1 = "MHz" # Units for axis 1 +# Uni2 = "km/s" # Units for axis 2 + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "2-d compound coordinate system" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SPECTRUM-REDSHIFT" # Coordinate system domain +# Lbl1 = "Frequency" # Label for axis 1 +# Lbl2 = "Optical velocity" # Label for axis 2 +# Uni1 = "MHz" # Units for axis 1 +# Uni2 = "km/s" # Units for axis 2 + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "FREQ" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "MHz" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UFreq = "MHz" # Preferred units for frequency + End SpecFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Domain = "REDSHIFT" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "VOPT" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "km/s" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UVopt = "km/s" # Preferred units for optical velocity + End SpecFrame + End CmpFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 1420.4000000000001 # Coordinate values... + X2 = 300 + End PointSet + IsA Region # An area within a coordinate system + End PointList + End Prism + Key3 = "PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 22 # Total member count + Key1 = "DOPPLERDEF" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "OPTICAL" # Item value + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 1 # Vector length + V2_1 = 0.29999999999999999 # Item values + Key3 = "DRESOLUTION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.69999999999999996 # Item values + Key4 = "HILIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2300.0" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "RedshiftInterval" # Item value + Key6 = "LOLIMIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "200.0" # Item value + Key7 = "PIXSIZE" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "0.3" # Item value + Key8 = "REDSHIFT" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "300.0" # Item value + Key9 = "REFPOS" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "BARYCENTER" # Item value + Key10 = "RESOLUTION" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "0.7" # Item value + Key11 = "TYPE" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "VELOCITY" # Item value + End KeyMap + Key2 = "SPACE_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 32 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "179.0 -11.5" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 179 # Item values + V2_2 = -11.5 + Key3 = "DERROR" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.00088900000000000003 # Item values + Key4 = "DPIXSIZE" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 2 # Vector length + V4_1 = 8.2999999999999998e-05 # Item values + V4_2 = 8.2999999999999998e-05 + Key5 = "DPOSITION" # Item name + Typ5 = 2 # Item data type (double) + Nel5 = 2 # Vector length + V5_1 = 179 # Item values + V5_2 = -11.5 + Key6 = "DRESOLUTION" # Item name + Typ6 = 2 # Item data type (double) + Nel6 = 1 # Vector length + V6_1 = 0.0017780000000000001 # Item values + Key7 = "DSIZE" # Item name + Typ7 = 2 # Item data type (double) + Nel7 = 2 # Vector length + V7_1 = 0.00033300000000000002 # Item values + V7_2 = 0.00027799999999999998 + Key8 = "ERROR" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "0.000889" # Item value + Key9 = "FRAME" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "ICRS" # Item value + Key10 = "ID" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "Circle" # Item value + Key11 = "PIXSIZE" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "0.000083 0.000083" # Item value + Key12 = "POSITION" # Item name + Typ12 = 3 # Item data type (string) + Val12 = "179.0 -11.5" # Item value + Key13 = "RADIUS" # Item name + Typ13 = 3 # Item data type (string) + Val13 = "0.5" # Item value + Key14 = "REFPOS" # Item name + Typ14 = 3 # Item data type (string) + Val14 = "GEOCENTER" # Item value + Key15 = "RESOLUTION" # Item name + Typ15 = 3 # Item data type (string) + Val15 = "0.001778" # Item value + Key16 = "SIZE" # Item name + Typ16 = 3 # Item data type (string) + Val16 = "0.000333 0.000278" # Item value + End KeyMap + Key3 = "SPECTRAL_PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DRESOLUTION" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 10 # Item values + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Spectral" # Item value + Key3 = "REFPOS" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "BARYCENTER" # Item value + Key4 = "RESOLUTION" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "10.0" # Item value + Key5 = "SPECTRAL" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1420.4" # Item value + Key6 = "UNIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "MHz" # Item value + End KeyMap + Key4 = "TIME_PROPS" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 30 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 1.2 # Item values + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 1 # Vector length + V2_1 = 1024 # Item values + Key3 = "DRESOLUTION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.80000000000000004 # Item values + Key4 = "ERROR" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1.2" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "TimeInterVal" # Item value + Key6 = "MJDSTART" # Item name + Typ6 = 2 # Item data type (double) + Val6 = 50083 # Item value + Key7 = "MJDSTOP" # Item name + Typ7 = 2 # Item data type (double) + Val7 = 50083.020833333336 # Item value + Key8 = "MJDTIME" # Item name + Typ8 = 2 # Item data type (double) + Val8 = 50814 # Item value + Key9 = "PIXSIZE" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "1024.0" # Item value + Key10 = "REFPOS" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "GEoCENTER" # Item value + Key11 = "RESOLUTION" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "0.8" # Item value + Key12 = "START" # Item name + Typ12 = 3 # Item data type (string) + Val12 = "1996-01-01T00:00:00" # Item value + Key13 = "STOP" # Item name + Typ13 = 3 # Item data type (string) + Val13 = "1996-01-01T00:30:00" # Item value + Key14 = "TIME" # Item name + Typ14 = 3 # Item data type (string) + Val14 = "MJD 50814.0" # Item value + Key15 = "TIMESCALE" # Item name + Typ15 = 3 # Item data type (string) + Val15 = "TT" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/stcs-ex1.out b/ast_tester/fixtures/stcs/stcs-ex1.out new file mode 100644 index 00000000..954638cc --- /dev/null +++ b/ast_tester/fixtures/stcs/stcs-ex1.out @@ -0,0 +1 @@ +TimeInterval TT GEoCENTER 1996-01-01T00:00:00 1996-01-01T00:30:00 Time MJD 50814.0 Error 1.2 Resolution 0.8 PixSize 1024.0 Circle ICRS GEOCENTER 179.0 -11.5 0.5 Position 179.0 -11.5 Error 0.000889 0.000889 Resolution 0.001778 Size 0.000333 0.000278 PixSize 0.000083 0.000083 Spectral BARYCENTER 1420.4 unit MHz Resolution 10.0 RedshiftInterval BARYCENTER VELOCITY OPTICAL 200 2300 Redshift 300 Resolution 0.7 PixSize 0.3 diff --git a/ast_tester/fixtures/stcs/stcs-ex1.out-20 b/ast_tester/fixtures/stcs/stcs-ex1.out-20 new file mode 100644 index 00000000..bd99bafb --- /dev/null +++ b/ast_tester/fixtures/stcs/stcs-ex1.out-20 @@ -0,0 +1,29 @@ +TimeInterval TT + GEoCENTER + 1996-01-01T00:00:00 + 1996-01-01T00:30:00 + Time MJD 50814.0 + Error 1.2 + Resolution 0.8 + PixSize 1024.0 +Circle ICRS + GEOCENTER 179.0 + -11.5 0.5 + Position 179.0 + -11.5 Error + 0.000889 0.000889 + Resolution + 0.001778 Size + 0.000333 0.000278 + PixSize 0.000083 + 0.000083 +Spectral BARYCENTER + 1420.4 unit MHz + Resolution 10.0 +RedshiftInterval + BARYCENTER + VELOCITY OPTICAL + 200 2300 + Redshift 300 + Resolution 0.7 + PixSize 0.3 diff --git a/ast_tester/fixtures/stcs/stcs-ex1.props.native b/ast_tester/fixtures/stcs/stcs-ex1.props.native new file mode 100644 index 00000000..1637af75 --- /dev/null +++ b/ast_tester/fixtures/stcs/stcs-ex1.props.native @@ -0,0 +1,193 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 22 # Total member count + Key1 = "DOPPLERDEF" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "OPTICAL" # Item value + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 1 # Vector length + V2_1 = 0.29999999999999999 # Item values + Key3 = "DRESOLUTION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.69999999999999996 # Item values + Key4 = "HILIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2300.0" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "RedshiftInterval" # Item value + Key6 = "LOLIMIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "200.0" # Item value + Key7 = "PIXSIZE" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "0.3" # Item value + Key8 = "REDSHIFT" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "300.0" # Item value + Key9 = "REFPOS" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "BARYCENTER" # Item value + Key10 = "RESOLUTION" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "0.7" # Item value + Key11 = "TYPE" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "VELOCITY" # Item value + End KeyMap + Key2 = "SPACE_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 32 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "179.0 -11.5" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 179 # Item values + V2_2 = -11.5 + Key3 = "DERROR" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.00088900000000000003 # Item values + Key4 = "DPIXSIZE" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 2 # Vector length + V4_1 = 8.2999999999999998e-05 # Item values + V4_2 = 8.2999999999999998e-05 + Key5 = "DPOSITION" # Item name + Typ5 = 2 # Item data type (double) + Nel5 = 2 # Vector length + V5_1 = 179 # Item values + V5_2 = -11.5 + Key6 = "DRESOLUTION" # Item name + Typ6 = 2 # Item data type (double) + Nel6 = 1 # Vector length + V6_1 = 0.0017780000000000001 # Item values + Key7 = "DSIZE" # Item name + Typ7 = 2 # Item data type (double) + Nel7 = 2 # Vector length + V7_1 = 0.00033300000000000002 # Item values + V7_2 = 0.00027799999999999998 + Key8 = "ERROR" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "0.000889" # Item value + Key9 = "FRAME" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "ICRS" # Item value + Key10 = "ID" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "Circle" # Item value + Key11 = "PIXSIZE" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "0.000083 0.000083" # Item value + Key12 = "POSITION" # Item name + Typ12 = 3 # Item data type (string) + Val12 = "179.0 -11.5" # Item value + Key13 = "RADIUS" # Item name + Typ13 = 3 # Item data type (string) + Val13 = "0.5" # Item value + Key14 = "REFPOS" # Item name + Typ14 = 3 # Item data type (string) + Val14 = "GEOCENTER" # Item value + Key15 = "RESOLUTION" # Item name + Typ15 = 3 # Item data type (string) + Val15 = "0.001778" # Item value + Key16 = "SIZE" # Item name + Typ16 = 3 # Item data type (string) + Val16 = "0.000333 0.000278" # Item value + End KeyMap + Key3 = "SPECTRAL_PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DRESOLUTION" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 10 # Item values + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Spectral" # Item value + Key3 = "REFPOS" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "BARYCENTER" # Item value + Key4 = "RESOLUTION" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "10.0" # Item value + Key5 = "SPECTRAL" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1420.4" # Item value + Key6 = "UNIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "MHz" # Item value + End KeyMap + Key4 = "TIME_PROPS" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 30 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 1.2 # Item values + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 1 # Vector length + V2_1 = 1024 # Item values + Key3 = "DRESOLUTION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.80000000000000004 # Item values + Key4 = "ERROR" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1.2" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "TimeInterVal" # Item value + Key6 = "MJDSTART" # Item name + Typ6 = 2 # Item data type (double) + Val6 = 50083 # Item value + Key7 = "MJDSTOP" # Item name + Typ7 = 2 # Item data type (double) + Val7 = 50083.020833333336 # Item value + Key8 = "MJDTIME" # Item name + Typ8 = 2 # Item data type (double) + Val8 = 50814 # Item value + Key9 = "PIXSIZE" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "1024.0" # Item value + Key10 = "REFPOS" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "GEoCENTER" # Item value + Key11 = "RESOLUTION" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "0.8" # Item value + Key12 = "START" # Item name + Typ12 = 3 # Item data type (string) + Val12 = "1996-01-01T00:00:00" # Item value + Key13 = "STOP" # Item name + Typ13 = 3 # Item data type (string) + Val13 = "1996-01-01T00:30:00" # Item value + Key14 = "TIME" # Item name + Typ14 = 3 # Item data type (string) + Val14 = "MJD 50814.0" # Item value + Key15 = "TIMESCALE" # Item name + Typ15 = 3 # Item data type (string) + Val15 = "TT" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/stcs-ex1.stcs b/ast_tester/fixtures/stcs/stcs-ex1.stcs new file mode 100644 index 00000000..afb49244 --- /dev/null +++ b/ast_tester/fixtures/stcs/stcs-ex1.stcs @@ -0,0 +1,13 @@ +TimeInterVal TT GEoCENTER +1996-01-01T00:00:00 1996-01-01T00:30:00 +Time MJD 50814.0 Error 1.2 +Resolution 0.8 PixSize 1024.0 +Circle ICRS GEOCENTER 179.0 -11.5 0.5 +Position 179.0 -11.5 Error 0.000889 +Resolution 0.001778 Size 0.000333 0.000278 +PixSIZE 0.000083 0.000083 +Spectral BARYCENTER 1420.4 unit MHz +Resolution 10.0 +RedshiftInterval BARYCENTER VELOCITY OPTICAL +200.0 2300.0 Redshift 300.0 +Resolution 0.7 PixSize 0.3 diff --git a/ast_tester/fixtures/stcs/stcs-ex1.warnings b/ast_tester/fixtures/stcs/stcs-ex1.warnings new file mode 100644 index 00000000..cd5981a6 --- /dev/null +++ b/ast_tester/fixtures/stcs/stcs-ex1.warnings @@ -0,0 +1,2 @@ +AST only supports topocentric time frames, so 'TOPOCENTER' will be used in place of 'GEoCENTER'. +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. diff --git a/ast_tester/fixtures/stcs/time-identifier.native b/ast_tester/fixtures/stcs/time-identifier.native new file mode 100644 index 00000000..03c99b2c --- /dev/null +++ b/ast_tester/fixtures/stcs/time-identifier.native @@ -0,0 +1,67 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "COORDS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin PointList # Collection of points +# Title = "Modified Julian Date [TT] offset from 1995-10-10 00:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1995.7713894593392 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1995-10-10 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin TimeFrame # Description of time coordinate system +# Title = "Modified Julian Date [TT] offset from 1995-10-10 00:00:00" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain + Epoch = 1995.7713894593392 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1995-10-10 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50000 # Time offset + End TimeFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0 # Coordinate values... + End PointSet + IsA Region # An area within a coordinate system + End PointList + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "TIME_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Time" # Item value + Key2 = "MJDTIME" # Item name + Typ2 = 2 # Item data type (double) + Val2 = 50000 # Item value + Key3 = "TIME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "MJD 50000.0" # Item value + Key4 = "TIMESCALE" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "TT" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/time-identifier.out b/ast_tester/fixtures/stcs/time-identifier.out new file mode 100644 index 00000000..5bdf8bce --- /dev/null +++ b/ast_tester/fixtures/stcs/time-identifier.out @@ -0,0 +1 @@ +Time TT TOPOCENTER MJD 50000.0 diff --git a/ast_tester/fixtures/stcs/time-identifier.out-20 b/ast_tester/fixtures/stcs/time-identifier.out-20 new file mode 100644 index 00000000..3211e165 --- /dev/null +++ b/ast_tester/fixtures/stcs/time-identifier.out-20 @@ -0,0 +1,2 @@ +Time TT TOPOCENTER + MJD 50000.0 diff --git a/ast_tester/fixtures/stcs/time-identifier.props.native b/ast_tester/fixtures/stcs/time-identifier.props.native new file mode 100644 index 00000000..21c0083a --- /dev/null +++ b/ast_tester/fixtures/stcs/time-identifier.props.native @@ -0,0 +1,23 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "TIME_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Time" # Item value + Key2 = "MJDTIME" # Item name + Typ2 = 2 # Item data type (double) + Val2 = 50000 # Item value + Key3 = "TIME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "MJD 50000.0" # Item value + Key4 = "TIMESCALE" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "TT" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/time-identifier.stcs b/ast_tester/fixtures/stcs/time-identifier.stcs new file mode 100644 index 00000000..d918e5d7 --- /dev/null +++ b/ast_tester/fixtures/stcs/time-identifier.stcs @@ -0,0 +1 @@ +Time TT MJD 50000.0 diff --git a/ast_tester/fixtures/stcs/time-identifier.warnings b/ast_tester/fixtures/stcs/time-identifier.warnings new file mode 100644 index 00000000..892d7209 --- /dev/null +++ b/ast_tester/fixtures/stcs/time-identifier.warnings @@ -0,0 +1 @@ +AST only supports topocentric time frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/time-spectral.native b/ast_tester/fixtures/stcs/time-spectral.native new file mode 100644 index 00000000..3330121c --- /dev/null +++ b/ast_tester/fixtures/stcs/time-spectral.native @@ -0,0 +1,381 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Prism # Region extrusion into higher dimensions +# Title = "2-d compound coordinate system" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "TIME-SPECTRUM" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Frequency" # Label for axis 2 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "MHz" # Units for axis 2 + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "2-d compound coordinate system" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "TIME-SPECTRUM" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Frequency" # Label for axis 2 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "MHz" # Units for axis 2 + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "FREQ" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "MHz" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UFreq = "MHz" # Preferred units for frequency + End SpecFrame + End CmpFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin Box # Axis intervals +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Closed = 1 # Boundary is inside + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin TimeFrame # Description of time coordinate system +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.010416666667879326 # Coordinate values... + X2 = 0.020833333335758653 + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin TimeFrame # Description of time coordinate system +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.010416666667879326 # Coordinate values... + X2 = 0.010430555556768216 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End Box + RegionB = # Second component Region + Begin PointList # Collection of points +# Title = "Frequency (Barycentric)" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Frequency" # Label for axis 1 +# System = "FREQ" # Coordinate system type +# Uni1 = "MHz" # Units for axis 1 + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SpecFrame # Description of spectral coordinate system +# Title = "Frequency (Barycentric)" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Frequency" # Label for axis 1 + System = "FREQ" # Coordinate system type +# Uni1 = "MHz" # Units for axis 1 + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "MHz" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UFreq = "MHz" # Preferred units for frequency + End SpecFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 1420.4000000000001 # Coordinate values... + End PointSet + IsA Region # An area within a coordinate system + End PointList + End Prism + Key2 = "COORDS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin Prism # Region extrusion into higher dimensions +# Title = "2-d compound coordinate system" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "TIME-SPECTRUM" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Frequency" # Label for axis 2 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "MHz" # Units for axis 2 + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "2-d compound coordinate system" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "TIME-SPECTRUM" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Frequency" # Label for axis 2 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "MHz" # Units for axis 2 + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "FREQ" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "MHz" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Barycentric" # Standard of rest + UFreq = "MHz" # Preferred units for frequency + End SpecFrame + End CmpFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin PointList # Collection of points +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 731 # Coordinate values... + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin TimeFrame # Description of time coordinate system +# Title = "Modified Julian Date [TT] offset from 1996-01-01 00:00:00" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain + Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 731 # Coordinate values... + X2 = 731.00001388888893 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End PointList + RegionB = # Second component Region + Begin PointList # Collection of points +# Title = "Frequency (Barycentric)" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Frequency" # Label for axis 1 +# System = "FREQ" # Coordinate system type +# Uni1 = "MHz" # Units for axis 1 + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 1420.4000000000001 # Coordinate values... + End PointSet + IsA Region # An area within a coordinate system + End PointList + End Prism + Key3 = "PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "SPECTRAL_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DRESOLUTION" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 10 # Item values + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Spectral" # Item value + Key3 = "REFPOS" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "barycenter" # Item value + Key4 = "RESOLUTION" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "10.0" # Item value + Key5 = "SPECTRAL" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1420.4" # Item value + Key6 = "UNIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "MHz" # Item value + End KeyMap + Key2 = "TIME_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 30 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 1.2 # Item values + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 1 # Vector length + V2_1 = 1024 # Item values + Key3 = "DRESOLUTION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.80000000000000004 # Item values + Key4 = "ERROR" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1.2" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "TimeInterval" # Item value + Key6 = "MJDSTART" # Item name + Typ6 = 2 # Item data type (double) + Val6 = 50083 # Item value + Key7 = "MJDSTOP" # Item name + Typ7 = 2 # Item data type (double) + Val7 = 50083.020833333336 # Item value + Key8 = "MJDTIME" # Item name + Typ8 = 2 # Item data type (double) + Val8 = 50814 # Item value + Key9 = "PIXSIZE" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "1024.0" # Item value + Key10 = "REFPOS" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "GEOCENTER" # Item value + Key11 = "RESOLUTION" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "0.8" # Item value + Key12 = "START" # Item name + Typ12 = 3 # Item data type (string) + Val12 = "1996-01-01T00:00:00" # Item value + Key13 = "STOP" # Item name + Typ13 = 3 # Item data type (string) + Val13 = "1996-01-01T00:30:00" # Item value + Key14 = "TIME" # Item name + Typ14 = 3 # Item data type (string) + Val14 = "mjd 50814.0" # Item value + Key15 = "TIMESCALE" # Item name + Typ15 = 3 # Item data type (string) + Val15 = "TT" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/time-spectral.out b/ast_tester/fixtures/stcs/time-spectral.out new file mode 100644 index 00000000..cbb11805 --- /dev/null +++ b/ast_tester/fixtures/stcs/time-spectral.out @@ -0,0 +1 @@ +TimeInterval TT GEOCENTER 1996-01-01T00:00:00 1996-01-01T00:30:00 Time 1998-01-01T00:00:00.0 Error 1.2 Resolution 0.8 PixSize 1024.0 Spectral BARYCENTER 1420.4 unit MHz Resolution 10.0 diff --git a/ast_tester/fixtures/stcs/time-spectral.out-20 b/ast_tester/fixtures/stcs/time-spectral.out-20 new file mode 100644 index 00000000..5f36d663 --- /dev/null +++ b/ast_tester/fixtures/stcs/time-spectral.out-20 @@ -0,0 +1,11 @@ +TimeInterval TT + GEOCENTER + 1996-01-01T00:00:00 + 1996-01-01T00:30:00 + Time 1998-01-01T00:00:00.0 + Error 1.2 + Resolution 0.8 + PixSize 1024.0 +Spectral BARYCENTER + 1420.4 unit MHz + Resolution 10.0 diff --git a/ast_tester/fixtures/stcs/time-spectral.props.native b/ast_tester/fixtures/stcs/time-spectral.props.native new file mode 100644 index 00000000..05aa6b05 --- /dev/null +++ b/ast_tester/fixtures/stcs/time-spectral.props.native @@ -0,0 +1,85 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "SPECTRAL_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DRESOLUTION" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 10 # Item values + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Spectral" # Item value + Key3 = "REFPOS" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "barycenter" # Item value + Key4 = "RESOLUTION" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "10.0" # Item value + Key5 = "SPECTRAL" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1420.4" # Item value + Key6 = "UNIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "MHz" # Item value + End KeyMap + Key2 = "TIME_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 30 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 1.2 # Item values + Key2 = "DPIXSIZE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 1 # Vector length + V2_1 = 1024 # Item values + Key3 = "DRESOLUTION" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 0.80000000000000004 # Item values + Key4 = "ERROR" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1.2" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "TimeInterval" # Item value + Key6 = "MJDSTART" # Item name + Typ6 = 2 # Item data type (double) + Val6 = 50083 # Item value + Key7 = "MJDSTOP" # Item name + Typ7 = 2 # Item data type (double) + Val7 = 50083.020833333336 # Item value + Key8 = "MJDTIME" # Item name + Typ8 = 2 # Item data type (double) + Val8 = 50814 # Item value + Key9 = "PIXSIZE" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "1024.0" # Item value + Key10 = "REFPOS" # Item name + Typ10 = 3 # Item data type (string) + Val10 = "GEOCENTER" # Item value + Key11 = "RESOLUTION" # Item name + Typ11 = 3 # Item data type (string) + Val11 = "0.8" # Item value + Key12 = "START" # Item name + Typ12 = 3 # Item data type (string) + Val12 = "1996-01-01T00:00:00" # Item value + Key13 = "STOP" # Item name + Typ13 = 3 # Item data type (string) + Val13 = "1996-01-01T00:30:00" # Item value + Key14 = "TIME" # Item name + Typ14 = 3 # Item data type (string) + Val14 = "mjd 50814.0" # Item value + Key15 = "TIMESCALE" # Item name + Typ15 = 3 # Item data type (string) + Val15 = "TT" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/time-spectral.stcs b/ast_tester/fixtures/stcs/time-spectral.stcs new file mode 100644 index 00000000..2d5d9603 --- /dev/null +++ b/ast_tester/fixtures/stcs/time-spectral.stcs @@ -0,0 +1,6 @@ +TimeInterval TT GEOCENTER +1996-01-01T00:00:00 1996-01-01T00:30:00 +Time mjd 50814.0 ERROR 1.2 +Resolution 0.8 PixSize 1024.0 +Spectral barycenter 1420.4 UNIT MHz +Resolution 10.0 diff --git a/ast_tester/fixtures/stcs/time-spectral.warnings b/ast_tester/fixtures/stcs/time-spectral.warnings new file mode 100644 index 00000000..b2681907 --- /dev/null +++ b/ast_tester/fixtures/stcs/time-spectral.warnings @@ -0,0 +1 @@ +AST only supports topocentric time frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. diff --git a/ast_tester/fixtures/stcs/timeinterval-allsky.moc b/ast_tester/fixtures/stcs/timeinterval-allsky.moc new file mode 100644 index 00000000..af4cb864 --- /dev/null +++ b/ast_tester/fixtures/stcs/timeinterval-allsky.moc @@ -0,0 +1,2 @@ +0/0-11 +8/ diff --git a/ast_tester/fixtures/stcs/timeinterval-allsky.native b/ast_tester/fixtures/stcs/timeinterval-allsky.native new file mode 100644 index 00000000..9f9f8e79 --- /dev/null +++ b/ast_tester/fixtures/stcs/timeinterval-allsky.native @@ -0,0 +1,115 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Interval # Axis intervals +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Epoch = 1995.9986310746458 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SkyFrame # Description of celestial coordinate system + Naxes = 2 # Number of coordinate axes + Epoch = 1995.9986310746458 # Julian epoch of observation + System = "ICRS" # Coordinate system type + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description + End SkyFrame + End CmpFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 3 # Number of coordinates per point + X1 = 0 # Coordinate values... + X4 = 0.020833333335758653 + End PointSet + IsA Region # An area within a coordinate system + End Interval + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "AllSky" # Item value + End KeyMap + Key2 = "TIME_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "TimeInterval" # Item value + Key2 = "MJDSTART" # Item name + Typ2 = 2 # Item data type (double) + Val2 = 50083 # Item value + Key3 = "MJDSTOP" # Item name + Typ3 = 2 # Item data type (double) + Val3 = 50083.020833333336 # Item value + Key4 = "START" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1996-01-01T00:00:00" # Item value + Key5 = "STOP" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1996-01-01T00:30:00" # Item value + Key6 = "TIMESCALE" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "TT" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/timeinterval-allsky.out b/ast_tester/fixtures/stcs/timeinterval-allsky.out new file mode 100644 index 00000000..e69de29b diff --git a/ast_tester/fixtures/stcs/timeinterval-allsky.out-20 b/ast_tester/fixtures/stcs/timeinterval-allsky.out-20 new file mode 100644 index 00000000..e69de29b diff --git a/ast_tester/fixtures/stcs/timeinterval-allsky.props.native b/ast_tester/fixtures/stcs/timeinterval-allsky.props.native new file mode 100644 index 00000000..ab0e3468 --- /dev/null +++ b/ast_tester/fixtures/stcs/timeinterval-allsky.props.native @@ -0,0 +1,43 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "AllSky" # Item value + End KeyMap + Key2 = "TIME_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "TimeInterval" # Item value + Key2 = "MJDSTART" # Item name + Typ2 = 2 # Item data type (double) + Val2 = 50083 # Item value + Key3 = "MJDSTOP" # Item name + Typ3 = 2 # Item data type (double) + Val3 = 50083.020833333336 # Item value + Key4 = "START" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1996-01-01T00:00:00" # Item value + Key5 = "STOP" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1996-01-01T00:30:00" # Item value + Key6 = "TIMESCALE" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "TT" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/timeinterval-allsky.stcs b/ast_tester/fixtures/stcs/timeinterval-allsky.stcs new file mode 100644 index 00000000..9bd98e65 --- /dev/null +++ b/ast_tester/fixtures/stcs/timeinterval-allsky.stcs @@ -0,0 +1 @@ +TimeInterval TT 1996-01-01T00:00:00 1996-01-01T00:30:00 AllSky ICRS diff --git a/ast_tester/fixtures/stcs/timeinterval-allsky.warnings b/ast_tester/fixtures/stcs/timeinterval-allsky.warnings new file mode 100644 index 00000000..b485d450 --- /dev/null +++ b/ast_tester/fixtures/stcs/timeinterval-allsky.warnings @@ -0,0 +1,2 @@ +AST only supports topocentric time frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/two-axis-box.moc b/ast_tester/fixtures/stcs/two-axis-box.moc new file mode 100644 index 00000000..7f8e88a7 --- /dev/null +++ b/ast_tester/fixtures/stcs/two-axis-box.moc @@ -0,0 +1,29 @@ +3/34 +4/129-131 134 140-142 161 1245 +5/174-175 513-515 528 530-531 540 542-543 572-574 608 610 640-641 643 652-653 + 656-658 4957-4959 4977 4979 4988-4989 4991 +6/685-687 689-692 694-695 744 746-747 2049-2051 2116 2118-2119 2136 2138-2139 + 2164 2166-2167 2300 2344 2346-2347 2436 2438-2439 2444 2464 2569 2597 2617 + 2620 2636 2640 2656 19805-19807 19821-19823 19825-19827 19905-19907 19913 + 19941 19961 20309 +7/2669-2671 2682 2717-2719 2733-2735 2737-2739 2753-2755 2774 2954 2982 3002 + 8193-8195 8470 8522 8550 8570 8662 9204 9208 9354 9382 9402 9750 9780 9784 + 9860 9864 10273 10285 10385 10397 10465 10477 10484 10488 10548 10552 10564 + 10568 10628 10632 79197-79199 79213-79215 79217-79219 79261-79263 79277-79279 + 79281-79283 79297-79299 79453 79617-79619 79649 79661 79761 79773 79841 79853 + 81233 81245 +8/10671 10675 10722 10734 10847 10863 10867 10911 10927 10931 10947 11011 11090 + 11102 11810 11822 11922 11934 12002 12014 32771 33874 33886 34082 34094 34194 + 34206 34274 34286 34642 34654 36820 36824 36836 36840 37410 37422 37522 37534 + 37602 37614 38994 39006 39124 39128 39140 39144 39202 39208 39444 39448 39460 + 39464 41088-41089 41091 41100-41101 41103 41136-41137 41139 41148-41149 41151 + 41536-41537 41539 41548-41549 41551 41584-41585 41587 41596-41597 41599 + 41856-41857 41859 41868-41869 41871 41904-41905 41907 41916-41917 41940 41944 + 41956 41960 42196 42200 42212 42216 42260 42264 42276 42280 42516 42520 42532 + 42536 316767 316783 316787 316831 316847 316851 316867 317023 317039 317043 + 317087 317103 317107 317123 317187 317791 317820-317821 317823 318467 + 318592-318593 318595 318604-318605 318607 318640-318641 318643 318652-318653 + 318655 319040-319041 319043 319052-319053 319055 319088-319089 319091 + 319100-319101 319103 319360-319361 319363 319372-319373 319375 319408-319409 + 319411 319420-319421 319423 324928-324929 324931 324940-324941 324943 + 324976-324977 324979 324988-324989 324991 diff --git a/ast_tester/fixtures/stcs/two-axis-box.native b/ast_tester/fixtures/stcs/two-axis-box.native new file mode 100644 index 00000000..eb1e87f0 --- /dev/null +++ b/ast_tester/fixtures/stcs/two-axis-box.native @@ -0,0 +1,96 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Box # Axis intervals +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.3490658503988659 # Coordinate values... + X2 = 0.52359877559829882 + X3 = 0.52359877559829882 + X4 = 0.69813170079773179 + End PointSet + IsA Region # An area within a coordinate system + End Box + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "DHILIMIT" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 30 # Item values + V1_2 = 40 + Key2 = "DLOLIMIT" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "HILIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "30 40" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "PositionInterval" # Item value + Key6 = "LOLIMIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "10 20" # Item value + Key7 = "REFPOS" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "TOPOCENTER" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/two-axis-box.out b/ast_tester/fixtures/stcs/two-axis-box.out new file mode 100644 index 00000000..87849215 --- /dev/null +++ b/ast_tester/fixtures/stcs/two-axis-box.out @@ -0,0 +1 @@ +PositionInterval ICRS TOPOCENTER 10 20 30 40 diff --git a/ast_tester/fixtures/stcs/two-axis-box.out-20 b/ast_tester/fixtures/stcs/two-axis-box.out-20 new file mode 100644 index 00000000..d111cce0 --- /dev/null +++ b/ast_tester/fixtures/stcs/two-axis-box.out-20 @@ -0,0 +1,3 @@ +PositionInterval + ICRS TOPOCENTER + 10 20 30 40 diff --git a/ast_tester/fixtures/stcs/two-axis-box.props.native b/ast_tester/fixtures/stcs/two-axis-box.props.native new file mode 100644 index 00000000..da90173c --- /dev/null +++ b/ast_tester/fixtures/stcs/two-axis-box.props.native @@ -0,0 +1,37 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "DHILIMIT" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 30 # Item values + V1_2 = 40 + Key2 = "DLOLIMIT" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "HILIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "30 40" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "PositionInterval" # Item value + Key6 = "LOLIMIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "10 20" # Item value + Key7 = "REFPOS" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "TOPOCENTER" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/two-axis-box.stcs b/ast_tester/fixtures/stcs/two-axis-box.stcs new file mode 100644 index 00000000..99773f15 --- /dev/null +++ b/ast_tester/fixtures/stcs/two-axis-box.stcs @@ -0,0 +1 @@ +PositionInterval ICRS TOPOCENTER 10 20 30 40 diff --git a/ast_tester/fixtures/stcs/two-axis-box.warnings b/ast_tester/fixtures/stcs/two-axis-box.warnings new file mode 100644 index 00000000..e69de29b diff --git a/ast_tester/fixtures/stcs/union-allsky.moc b/ast_tester/fixtures/stcs/union-allsky.moc new file mode 100644 index 00000000..af4cb864 --- /dev/null +++ b/ast_tester/fixtures/stcs/union-allsky.moc @@ -0,0 +1,2 @@ +0/0-11 +8/ diff --git a/ast_tester/fixtures/stcs/union-allsky.native b/ast_tester/fixtures/stcs/union-allsky.native new file mode 100644 index 00000000..496f080d --- /dev/null +++ b/ast_tester/fixtures/stcs/union-allsky.native @@ -0,0 +1,106 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin NullRegion # Boundless region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Negate = 1 # Region negated + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + End NullRegion + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Union" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 2 # Item value + Key4 = "REGION1" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "AllSky" # Item value + End KeyMap + Key5 = "REGION2" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1" # Item value + End KeyMap + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/union-allsky.out b/ast_tester/fixtures/stcs/union-allsky.out new file mode 100644 index 00000000..86756c85 --- /dev/null +++ b/ast_tester/fixtures/stcs/union-allsky.out @@ -0,0 +1 @@ +AllSky ICRS TOPOCENTER diff --git a/ast_tester/fixtures/stcs/union-allsky.out-20 b/ast_tester/fixtures/stcs/union-allsky.out-20 new file mode 100644 index 00000000..a3360bc5 --- /dev/null +++ b/ast_tester/fixtures/stcs/union-allsky.out-20 @@ -0,0 +1,2 @@ +AllSky ICRS + TOPOCENTER diff --git a/ast_tester/fixtures/stcs/union-allsky.props.native b/ast_tester/fixtures/stcs/union-allsky.props.native new file mode 100644 index 00000000..6b888fa8 --- /dev/null +++ b/ast_tester/fixtures/stcs/union-allsky.props.native @@ -0,0 +1,54 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Union" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 2 # Item value + Key4 = "REGION1" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "AllSky" # Item value + End KeyMap + Key5 = "REGION2" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/union-allsky.stcs b/ast_tester/fixtures/stcs/union-allsky.stcs new file mode 100644 index 00000000..9c7b67e3 --- /dev/null +++ b/ast_tester/fixtures/stcs/union-allsky.stcs @@ -0,0 +1 @@ +Union ICRS ( AllSky Circle 10 20 1 ) diff --git a/ast_tester/fixtures/stcs/union-allsky.warnings b/ast_tester/fixtures/stcs/union-allsky.warnings new file mode 100644 index 00000000..29457709 --- /dev/null +++ b/ast_tester/fixtures/stcs/union-allsky.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/teststcschan.c b/ast_tester/teststcschan.c index 5cc834bb..0b9daa15 100644 --- a/ast_tester/teststcschan.c +++ b/ast_tester/teststcschan.c @@ -20,6 +20,9 @@ * reads to a Box, that a Box or Interval written as STC-S reads back, that an * all-sky Region writes as AllSky, and that an unsupported spatial unit * is reported as AST__BADIN. + * - The PROPS KeyMap read from doc3 is compared with + * stcschan-test1-doc3-props.ast as dump text rather than with astEqual, + * which compares only the class of two KeyMaps. */ #include "ast.h" @@ -421,6 +424,64 @@ static AstObject *readast( const char *file, int *status ) { return obj; } +/* ---- dump_matches: compare a Native dump with a .ast text file ---- */ + +/* The text a dump is written to by dump_sink. */ +static char *dump_text = NULL; +static size_t dump_len = 0; + +static void dump_sink( const char *line ) { + size_t n = strlen( line ); + dump_text = astGrow( dump_text, dump_len + n + 2, 1 ); + if( dump_text ) { + memcpy( dump_text + dump_len, line, n ); + dump_len += n; + dump_text[ dump_len++ ] = '\n'; + dump_text[ dump_len ] = '\0'; + } +} + +/* Return non-zero if the Native dump of "obj", written by a default + Channel, is the text of "file", byte for byte. astEqual cannot be used + for a KeyMap, as it compares the class alone. */ +static int dump_matches( AstObject *obj, const char *file ) { + AstChannel *ch; + FILE *fp; + char path[ PATH_MAX ]; + char *want; + const char *srcdir; + long size; + int result = 0; + + srcdir = getenv("srcdir") ? getenv("srcdir") : "."; + snprintf( path, sizeof( path ), "%s/%s", srcdir, file ); + fp = fopen( path, "rb" ); + if( !fp ) { + printf( "Cannot open %s\n", path ); + return 0; + } + fseek( fp, 0, SEEK_END ); + size = ftell( fp ); + rewind( fp ); + want = astMalloc( (size_t) size + 1 ); + if( want && fread( want, 1, (size_t) size, fp ) == (size_t) size ) { + want[ size ] = '\0'; + dump_text = NULL; + dump_len = 0; + ch = astChannel( NULL, dump_sink, " " ); + astWrite( ch, obj ); + ch = astAnnul( ch ); + result = astOK && dump_text && !strcmp( dump_text, want ); + if( astOK && !result ) { + printf( "Dump:\n%s", dump_text ? dump_text : "" ); + } + dump_text = astFree( dump_text ); + } + want = astFree( want ); + fclose( fp ); + return result; +} + /* ================================================================ */ static void test1( int *status ) { @@ -519,10 +580,10 @@ static void test1( int *status ) { } if( astMapGet0A( (AstKeyMap *)obj, "PROPS", &iobj ) ) { - sb = readast( "fixtures/programs/teststcschan/stcschan-test1-doc3-props.ast", status ); - if( *status == 0 && !astEqual( iobj, sb ) ) - error( "PROPS read from doc3 is not equal to the object read " - "from file fixtures/programs/teststcschan/stcschan-test1-doc3-props.ast", status ); + if( *status == 0 && + !dump_matches( iobj, "fixtures/programs/teststcschan/stcschan-test1-doc3-props.ast" ) ) + error( "The dump of PROPS read from doc3 differs from file " + "fixtures/programs/teststcschan/stcschan-test1-doc3-props.ast", status ); } else { error( "No PROPS entry found", status ); } diff --git a/newsfragments/+stcs-corpus.build b/newsfragments/+stcs-corpus.build new file mode 100644 index 00000000..a34de7ae --- /dev/null +++ b/newsfragments/+stcs-corpus.build @@ -0,0 +1 @@ +The test suite gains an STC-S corpus under fixtures/stcs, shared with the Rust port of AST, and a check_stcs_corpus ctest for each of its documents that reads the document through an StcsChan and compares the error, the Native dumps of the object and properties read, the warnings and the STC-S written back at several Indent and StcsLength settings with the committed expectation files. teststcschan now compares the properties KeyMap read from its third document with its fixture as dump text, and the fixture is regenerated to hold what astRead returns. From 7bb344194628b5360d80a74afd96bc705875d949 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Thu, 3 Dec 2026 15:15:24 -0800 Subject: [PATCH 4/7] check_stcs_corpus: check the warnings of the writes and read back every variant The checker now compares the warnings an StcsChan gives when writing a document with .write-warnings, failing when a write warns and the file is absent, and reads back the .out-20 and .out-indent texts as well as .out. The includes it relies on are named explicitly. teststcschan checks the fseek and ftell calls that size its fixture, and the corpus loop in CMakeLists.txt says why the status of its fixture check is unused. Generated with AI Co-Authored-By: SLAC AI --- ast_tester/CMakeLists.txt | 3 + ast_tester/check_stcs_corpus.c | 150 ++++++++++++------ .../stcs/timeinterval-allsky.write-warnings | 2 + ast_tester/teststcschan.c | 7 +- 4 files changed, 109 insertions(+), 53 deletions(-) create mode 100644 ast_tester/fixtures/stcs/timeinterval-allsky.write-warnings diff --git a/ast_tester/CMakeLists.txt b/ast_tester/CMakeLists.txt index 42855b3a..7a779c06 100644 --- a/ast_tester/CMakeLists.txt +++ b/ast_tester/CMakeLists.txt @@ -490,6 +490,9 @@ if(_stcs_ok) continue() endif() string(REGEX MATCH "^[^ \t]+" _stcs_name "${_row}") + # Called for its check alone: a row whose document is missing stops + # the configuration, as the corpus is distributed whole, so the + # status it returns is not needed. ast_fixture_status("stcs/corpus.txt" "stcs/${_stcs_name}.stcs" _doc_ok) add_test(NAME stcs_corpus_${_stcs_name} COMMAND check_stcs_corpus "${AST_FIXTURE_BINARY_ROOT}" diff --git a/ast_tester/check_stcs_corpus.c b/ast_tester/check_stcs_corpus.c index 68f4e0b4..50ef0b4d 100644 --- a/ast_tester/check_stcs_corpus.c +++ b/ast_tester/check_stcs_corpus.c @@ -28,18 +28,24 @@ * .out-indent, each line as the sink receives it, trailing spaces * included, followed by a newline. StcsLength is ignored at Indent 0, * so the short-line variant is written with Indent set. Each write - * must write one object; - * - .out, read back with the three attributes set and written again - * at Indent 0 and StcsLength 70, must be the same text. + * must write one object, and give the warnings in + * .write-warnings, one per line, or none when there is no such + * file; + * - .out, .out-20 and any .out-indent, each read back + * with the three attributes set and written again at Indent 0 and + * StcsLength 70, must be the text of .out. * The documents in WRITES_NOTHING_EXCLUDED and READ_BACK_EXCLUDED are - * checked for what they do instead, so that each fails when it starts to + * checked for what they do instead (a document in WRITES_NOTHING_EXCLUDED + * writes no object but still gives the warnings of its .write-warnings + * file), so that each fails when it starts to * behave like the others. * * The expectation files were captured on Linux x86_64, where the texts * must be identical. On any other platform a line may also match by the * rule of compare_dumps.c (every token byte-equal, or both doubles within * MAX_ULPS), which is included here so that the rule has one definition. - * The warnings and the error message are compared exactly everywhere. + * The warnings, of the reads and of the writes, and the error message are + * compared exactly everywhere. * * Exit status: 0 when every expectation of the document is met, 1 when one * is not, 2 for a usage error or a missing file. @@ -50,6 +56,9 @@ #include "ast.h" #include +#include +#include +#include /* The texts are compared byte for byte on the platform the expectation files were captured on, and by the rule of compare_dumps.c elsewhere. */ @@ -323,6 +332,29 @@ static void check_text( const char *got, const char *dir, const char *ext, text_free( &want ); } +/* Append the warnings "ch" holds, one per line, to "warnings". */ +static void append_warnings( AstStcsChan *ch, Text *warnings ) { + AstKeyMap *km; + int i; + + if( !astOK ) return; + km = astWarnings( ch ); + if( km ) { + for( i = 1; i <= astMapSize( km ) && astOK; i++ ) { + char key[ 32 ]; + const char *msg; + snprintf( key, sizeof key, "Warning_%d", i ); + if( astMapGet0C( km, key, &msg ) ) { + text_append( warnings, msg ); + text_append( warnings, "\n" ); + } else { + fail( "the warnings have no %s", key ); + } + } + km = astAnnul( km ); + } +} + /* Read "doc" through an StcsChan at ReportLevel 3 with the given StcsArea, StcsCoords and StcsProps. The warnings, one per line, are appended to "warnings" when it is not NULL. */ @@ -330,7 +362,6 @@ static AstObject *read_stcs( const char *doc, int area, int coords, int props, Text *warnings ) { AstStcsChan *ch; AstObject *obj; - AstKeyMap *km; char *copy; size_t n = strlen( doc ); @@ -347,24 +378,7 @@ static AstObject *read_stcs( const char *doc, int area, int coords, "ReportLevel=3,StcsArea=%d,StcsCoords=%d,StcsProps=%d", area, coords, props ); obj = astRead( ch ); - if( warnings && astOK ) { - km = astWarnings( ch ); - if( km ) { - int i; - for( i = 1; i <= astMapSize( km ) && astOK; i++ ) { - char key[ 32 ]; - const char *msg; - snprintf( key, sizeof key, "Warning_%d", i ); - if( astMapGet0C( km, key, &msg ) ) { - text_append( warnings, msg ); - text_append( warnings, "\n" ); - } else { - fail( "the warnings have no %s", key ); - } - } - km = astAnnul( km ); - } - } + if( warnings ) append_warnings( ch, warnings ); ch = astAnnul( ch ); source_pos = source_end = NULL; free( copy ); @@ -399,9 +413,11 @@ static void dump( AstObject *obj, Text *t ) { } /* Write "obj" through an StcsChan at ReportLevel 3 with the given Indent - and StcsLength, appending the text to "t". Returns the number of + and StcsLength, appending the text to "t" and, when "warnings" is not + NULL, the warnings, one per line, to "warnings". Returns the number of objects written. */ -static int write_stcs( AstObject *obj, int indent, int length, Text *t ) { +static int write_stcs( AstObject *obj, int indent, int length, Text *t, + Text *warnings ) { AstStcsChan *ch; int n; @@ -410,6 +426,7 @@ static int write_stcs( AstObject *obj, int indent, int length, Text *t ) { sink_text = t; n = astWrite( ch, obj ); sink_text = NULL; + if( warnings ) append_warnings( ch, warnings ); ch = astAnnul( ch ); return n; } @@ -528,32 +545,80 @@ static const char *read_back_excluded( const char *name ) { return NULL; } -/* Write "obj" in "variant" and compare the text with its file. */ +/* Write "obj" in "variant" and compare the text with its file, and the + warnings with the .write-warnings file, or with none when there is no + such file. */ static void check_variant( AstObject *obj, const char *dir, const Variant *variant ) { + char path[ 4096 ]; Text t; + Text warnings; int want = writes_nothing( docname ) ? 0 : 1; int n; text_init( &t ); - n = write_stcs( obj, variant->indent, variant->length, &t ); + text_init( &warnings ); + n = write_stcs( obj, variant->indent, variant->length, &t, &warnings ); if( !failed( "writing" ) ) { if( n != want ) { fail( "writing %s wrote %d objects, not %d%s", variant->ext, n, want, want ? "" : "; remove it from WRITES_NOTHING_EXCLUDED" ); } check_text( t.text, dir, variant->ext, 0 ); + corpus_path( path, sizeof path, dir, docname, "write-warnings" ); + if( file_exists( path ) ) { + check_text( warnings.text, dir, "write-warnings", 1 ); + } else if( warnings.len ) { + fail( "writing %s gave warnings, but there is no %s.write-warnings" + "\n--- got\n%s", variant->ext, docname, warnings.text ); + } } + text_free( &warnings ); text_free( &t ); } -/* The writing checks, and the read-back of the .out text. */ +/* Read back the text of "variant", write it at Indent 0 and StcsLength 70 + and compare that with the .out text "out". */ +static void read_back( const char *dir, const Variant *variant, + const char *out ) { + char path[ 4096 ]; + AstObject *again; + Text text; + Text t; + int n; + + corpus_path( path, sizeof path, dir, docname, variant->ext ); + read_file( path, &text ); + again = read_stcs( text.text, 1, 1, 1, NULL ); + if( !failed( "reading back the written text" ) ) { + if( !again ) { + fail( "%s.%s read back gives no object", docname, variant->ext ); + } else { + text_init( &t ); + n = write_stcs( again, 0, 70, &t, NULL ); + if( !failed( "writing the text read back" ) ) { + if( n != 1 ) { + fail( "%s.%s read back writes %d objects", docname, + variant->ext, n ); + } + if( !texts_match( t.text, out ) ) { + fail( "%s.%s read back is written as other text than %s.out\n" + "--- got\n%s--- expected\n%s", docname, variant->ext, + docname, t.text, out ); + } + } + text_free( &t ); + again = astAnnul( again ); + } + } + text_free( &text ); +} + +/* The writing checks, and the read-back of the written texts. */ static void check_writing( AstObject *obj, const char *dir, int indent ) { char path[ 4096 ]; const char *why; - AstObject *again; Text out; - Text t; int i; int n; @@ -583,26 +648,9 @@ static void check_writing( AstObject *obj, const char *dir, int indent ) { docname, n, first_error ); } } else { - again = read_stcs( out.text, 1, 1, 1, NULL ); - if( !failed( "reading back the .out text" ) ) { - if( !again ) { - fail( "%s.out read back gives no object", docname ); - } else { - text_init( &t ); - n = write_stcs( again, 0, 70, &t ); - if( !failed( "writing the .out text read back" ) ) { - if( n != 1 ) { - fail( "%s.out read back writes %d objects", docname, n ); - } - if( !texts_match( t.text, out.text ) ) { - fail( "%s.out read back is written as other text\n" - "--- got\n%s--- expected\n%s", docname, t.text, - out.text ); - } - } - text_free( &t ); - again = astAnnul( again ); - } + for( i = 0; i < NWRITE_VARIANTS + indent; i++ ) { + read_back( dir, i < NWRITE_VARIANTS ? &WRITE_VARIANTS[ i ] : + &INDENT_VARIANT, out.text ); } } text_free( &out ); diff --git a/ast_tester/fixtures/stcs/timeinterval-allsky.write-warnings b/ast_tester/fixtures/stcs/timeinterval-allsky.write-warnings new file mode 100644 index 00000000..c0b2464e --- /dev/null +++ b/ast_tester/fixtures/stcs/timeinterval-allsky.write-warnings @@ -0,0 +1,2 @@ +Spatial axis 1 has an undefined lower limit. +Spatial axis 1 has an undefined upper limit. diff --git a/ast_tester/teststcschan.c b/ast_tester/teststcschan.c index 0b9daa15..1444121e 100644 --- a/ast_tester/teststcschan.c +++ b/ast_tester/teststcschan.c @@ -460,8 +460,11 @@ static int dump_matches( AstObject *obj, const char *file ) { printf( "Cannot open %s\n", path ); return 0; } - fseek( fp, 0, SEEK_END ); - size = ftell( fp ); + if( fseek( fp, 0, SEEK_END ) || ( size = ftell( fp ) ) < 0 ) { + printf( "Cannot find the size of %s\n", path ); + fclose( fp ); + return 0; + } rewind( fp ); want = astMalloc( (size_t) size + 1 ); if( want && fread( want, 1, (size_t) size, fp ) == (size_t) size ) { From 5fa64ee540c4b93b0caa9c82021fb057aac40da8 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Thu, 3 Dec 2026 15:15:24 -0800 Subject: [PATCH 5/7] fixtures/stcs: cover each reading path of StcsChan The corpus gains documents for the velocity and redshift sub-phrases (VelocityInterval, RedshiftInterval of RADIO type, a unit of Hz, a relativistic definition, a two-value Error), times given as JD, the TEB time scale and a two-value time Error, a GEO_C frame, the MOON spectral reference position, per-axis units in a Cartesian frame, Cartesian shapes of one and three axes, nested compound regions, a four-value position Error and a Position with an Error, and documents for the messages of each malformed shape and compound region. The README is rewritten to describe both consumers of the shared tree, the .write-warnings file and the rules of each comparison. Generated with AI Co-Authored-By: SLAC AI --- PLAN.md | 8 +- ast_tester/fixtures/stcs/README.md | 55 ++-- ast_tester/fixtures/stcs/box-cart1.error | 2 + ast_tester/fixtures/stcs/box-cart1.stcs | 1 + .../fixtures/stcs/box-cart2-units.native | 98 +++++++ ast_tester/fixtures/stcs/box-cart2-units.out | 1 + .../fixtures/stcs/box-cart2-units.out-20 | 4 + .../stcs/box-cart2-units.props.native | 40 +++ ast_tester/fixtures/stcs/box-cart2-units.stcs | 1 + .../fixtures/stcs/box-cart2-units.warnings | 1 + .../stcs/box-cart2-units.write-warnings | 1 + ast_tester/fixtures/stcs/box-cart3.error | 2 + ast_tester/fixtures/stcs/box-cart3.stcs | 1 + .../fixtures/stcs/box-missing-bsize.error | 2 + .../fixtures/stcs/box-missing-bsize.stcs | 1 + .../fixtures/stcs/circle-error-range.moc | 4 + .../fixtures/stcs/circle-error-range.native | 125 ++++++++ .../fixtures/stcs/circle-error-range.out | 1 + .../fixtures/stcs/circle-error-range.out-20 | 3 + .../stcs/circle-error-range.props.native | 39 +++ .../fixtures/stcs/circle-error-range.stcs | 1 + .../fixtures/stcs/circle-error-range.warnings | 2 + .../fixtures/stcs/circle-position-error.moc | 4 + .../stcs/circle-position-error.native | 207 +++++++++++++ .../fixtures/stcs/circle-position-error.out | 1 + .../stcs/circle-position-error.out-20 | 4 + .../stcs/circle-position-error.props.native | 44 +++ .../fixtures/stcs/circle-position-error.stcs | 1 + .../stcs/circle-position-error.warnings | 1 + ast_tester/fixtures/stcs/corpus.txt | 31 ++ ast_tester/fixtures/stcs/difference.moc | 9 + ast_tester/fixtures/stcs/difference.native | 218 ++++++++++++++ ast_tester/fixtures/stcs/difference.out | 1 + ast_tester/fixtures/stcs/difference.out-20 | 8 + .../fixtures/stcs/difference.props.native | 65 ++++ ast_tester/fixtures/stcs/difference.stcs | 1 + ast_tester/fixtures/stcs/difference.warnings | 1 + ast_tester/fixtures/stcs/ellipse-cart2.native | 93 ++++++ ast_tester/fixtures/stcs/ellipse-cart2.out | 1 + ast_tester/fixtures/stcs/ellipse-cart2.out-20 | 4 + .../fixtures/stcs/ellipse-cart2.props.native | 38 +++ ast_tester/fixtures/stcs/ellipse-cart2.stcs | 1 + .../fixtures/stcs/ellipse-cart2.warnings | 1 + .../stcs/ellipse-cart2.write-warnings | 1 + .../fixtures/stcs/ellipse-missing-angle.error | 2 + .../fixtures/stcs/ellipse-missing-angle.stcs | 1 + ast_tester/fixtures/stcs/geo-c.native | 88 ++++++ ast_tester/fixtures/stcs/geo-c.out | 1 + ast_tester/fixtures/stcs/geo-c.out-20 | 3 + ast_tester/fixtures/stcs/geo-c.props.native | 29 ++ ast_tester/fixtures/stcs/geo-c.stcs | 1 + ast_tester/fixtures/stcs/geo-c.warnings | 2 + ast_tester/fixtures/stcs/intersection-not.moc | 9 + .../fixtures/stcs/intersection-not.native | 186 ++++++++++++ ast_tester/fixtures/stcs/intersection-not.out | 1 + .../fixtures/stcs/intersection-not.out-20 | 8 + .../stcs/intersection-not.props.native | 79 +++++ .../fixtures/stcs/intersection-not.stcs | 1 + .../fixtures/stcs/intersection-not.warnings | 1 + .../stcs/intersection-one-region.error | 2 + .../stcs/intersection-one-region.stcs | 1 + .../fixtures/stcs/not-two-regions.error | 2 + ast_tester/fixtures/stcs/not-two-regions.stcs | 1 + .../fixtures/stcs/polygon-odd-vertex.error | 2 + .../fixtures/stcs/polygon-odd-vertex.stcs | 1 + .../fixtures/stcs/redshift-error-range.native | 96 ++++++ .../fixtures/stcs/redshift-error-range.out | 1 + .../fixtures/stcs/redshift-error-range.out-20 | 3 + .../stcs/redshift-error-range.props.native | 31 ++ .../fixtures/stcs/redshift-error-range.stcs | 1 + .../stcs/redshift-error-range.warnings | 1 + .../fixtures/stcs/redshift-radio.native | 72 +++++ ast_tester/fixtures/stcs/redshift-radio.out | 1 + .../fixtures/stcs/redshift-radio.out-20 | 3 + .../fixtures/stcs/redshift-radio.props.native | 29 ++ ast_tester/fixtures/stcs/redshift-radio.stcs | 1 + .../fixtures/stcs/redshift-radio.warnings | 1 + .../stcs/redshift-relativistic.native | 148 ++++++++++ .../fixtures/stcs/redshift-relativistic.out | 1 + .../stcs/redshift-relativistic.out-20 | 5 + .../stcs/redshift-relativistic.props.native | 33 +++ .../fixtures/stcs/redshift-relativistic.stcs | 1 + .../stcs/redshift-relativistic.warnings | 2 + .../fixtures/stcs/redshift-unit-hz.native | 96 ++++++ ast_tester/fixtures/stcs/redshift-unit-hz.out | 1 + .../fixtures/stcs/redshift-unit-hz.out-20 | 3 + .../stcs/redshift-unit-hz.props.native | 36 +++ .../fixtures/stcs/redshift-unit-hz.stcs | 1 + .../fixtures/stcs/redshift-unit-hz.warnings | 1 + .../fixtures/stcs/spectral-error-range.native | 93 ++++++ .../fixtures/stcs/spectral-error-range.out | 1 + .../fixtures/stcs/spectral-error-range.out-20 | 2 + .../stcs/spectral-error-range.props.native | 28 ++ .../fixtures/stcs/spectral-error-range.stcs | 1 + .../stcs/spectral-error-range.warnings | 2 + ast_tester/fixtures/stcs/spectral-moon.native | 68 +++++ ast_tester/fixtures/stcs/spectral-moon.out | 1 + ast_tester/fixtures/stcs/spectral-moon.out-20 | 2 + .../fixtures/stcs/spectral-moon.props.native | 23 ++ ast_tester/fixtures/stcs/spectral-moon.stcs | 1 + .../fixtures/stcs/spectral-moon.warnings | 1 + ast_tester/fixtures/stcs/teb-timescale.moc | 4 + ast_tester/fixtures/stcs/teb-timescale.native | 277 ++++++++++++++++++ ast_tester/fixtures/stcs/teb-timescale.out | 1 + ast_tester/fixtures/stcs/teb-timescale.out-20 | 9 + .../fixtures/stcs/teb-timescale.props.native | 67 +++++ ast_tester/fixtures/stcs/teb-timescale.stcs | 1 + .../fixtures/stcs/teb-timescale.warnings | 4 + .../fixtures/stcs/time-error-range.native | 98 +++++++ ast_tester/fixtures/stcs/time-error-range.out | 1 + .../fixtures/stcs/time-error-range.out-20 | 3 + .../stcs/time-error-range.props.native | 34 +++ .../fixtures/stcs/time-error-range.stcs | 1 + .../fixtures/stcs/time-error-range.warnings | 1 + ast_tester/fixtures/stcs/time-jd.native | 78 +++++ ast_tester/fixtures/stcs/time-jd.out | 1 + ast_tester/fixtures/stcs/time-jd.out-20 | 4 + ast_tester/fixtures/stcs/time-jd.props.native | 32 ++ ast_tester/fixtures/stcs/time-jd.stcs | 1 + ast_tester/fixtures/stcs/time-jd.warnings | 0 .../fixtures/stcs/timeinterval-unit-m.error | 2 + .../fixtures/stcs/timeinterval-unit-m.stcs | 1 + .../fixtures/stcs/union-no-opening.error | 2 + .../fixtures/stcs/union-no-opening.stcs | 1 + .../fixtures/stcs/union-not-a-region.error | 2 + .../fixtures/stcs/union-not-a-region.stcs | 1 + .../fixtures/stcs/velocity-interval.moc | 4 + .../fixtures/stcs/velocity-interval.native | 104 +++++++ .../fixtures/stcs/velocity-interval.out | 1 + .../fixtures/stcs/velocity-interval.out-20 | 3 + .../stcs/velocity-interval.props.native | 45 +++ .../fixtures/stcs/velocity-interval.stcs | 1 + .../fixtures/stcs/velocity-interval.warnings | 2 + newsfragments/+stcs-corpus.build | 2 +- 134 files changed, 3102 insertions(+), 26 deletions(-) create mode 100644 ast_tester/fixtures/stcs/box-cart1.error create mode 100644 ast_tester/fixtures/stcs/box-cart1.stcs create mode 100644 ast_tester/fixtures/stcs/box-cart2-units.native create mode 100644 ast_tester/fixtures/stcs/box-cart2-units.out create mode 100644 ast_tester/fixtures/stcs/box-cart2-units.out-20 create mode 100644 ast_tester/fixtures/stcs/box-cart2-units.props.native create mode 100644 ast_tester/fixtures/stcs/box-cart2-units.stcs create mode 100644 ast_tester/fixtures/stcs/box-cart2-units.warnings create mode 100644 ast_tester/fixtures/stcs/box-cart2-units.write-warnings create mode 100644 ast_tester/fixtures/stcs/box-cart3.error create mode 100644 ast_tester/fixtures/stcs/box-cart3.stcs create mode 100644 ast_tester/fixtures/stcs/box-missing-bsize.error create mode 100644 ast_tester/fixtures/stcs/box-missing-bsize.stcs create mode 100644 ast_tester/fixtures/stcs/circle-error-range.moc create mode 100644 ast_tester/fixtures/stcs/circle-error-range.native create mode 100644 ast_tester/fixtures/stcs/circle-error-range.out create mode 100644 ast_tester/fixtures/stcs/circle-error-range.out-20 create mode 100644 ast_tester/fixtures/stcs/circle-error-range.props.native create mode 100644 ast_tester/fixtures/stcs/circle-error-range.stcs create mode 100644 ast_tester/fixtures/stcs/circle-error-range.warnings create mode 100644 ast_tester/fixtures/stcs/circle-position-error.moc create mode 100644 ast_tester/fixtures/stcs/circle-position-error.native create mode 100644 ast_tester/fixtures/stcs/circle-position-error.out create mode 100644 ast_tester/fixtures/stcs/circle-position-error.out-20 create mode 100644 ast_tester/fixtures/stcs/circle-position-error.props.native create mode 100644 ast_tester/fixtures/stcs/circle-position-error.stcs create mode 100644 ast_tester/fixtures/stcs/circle-position-error.warnings create mode 100644 ast_tester/fixtures/stcs/difference.moc create mode 100644 ast_tester/fixtures/stcs/difference.native create mode 100644 ast_tester/fixtures/stcs/difference.out create mode 100644 ast_tester/fixtures/stcs/difference.out-20 create mode 100644 ast_tester/fixtures/stcs/difference.props.native create mode 100644 ast_tester/fixtures/stcs/difference.stcs create mode 100644 ast_tester/fixtures/stcs/difference.warnings create mode 100644 ast_tester/fixtures/stcs/ellipse-cart2.native create mode 100644 ast_tester/fixtures/stcs/ellipse-cart2.out create mode 100644 ast_tester/fixtures/stcs/ellipse-cart2.out-20 create mode 100644 ast_tester/fixtures/stcs/ellipse-cart2.props.native create mode 100644 ast_tester/fixtures/stcs/ellipse-cart2.stcs create mode 100644 ast_tester/fixtures/stcs/ellipse-cart2.warnings create mode 100644 ast_tester/fixtures/stcs/ellipse-cart2.write-warnings create mode 100644 ast_tester/fixtures/stcs/ellipse-missing-angle.error create mode 100644 ast_tester/fixtures/stcs/ellipse-missing-angle.stcs create mode 100644 ast_tester/fixtures/stcs/geo-c.native create mode 100644 ast_tester/fixtures/stcs/geo-c.out create mode 100644 ast_tester/fixtures/stcs/geo-c.out-20 create mode 100644 ast_tester/fixtures/stcs/geo-c.props.native create mode 100644 ast_tester/fixtures/stcs/geo-c.stcs create mode 100644 ast_tester/fixtures/stcs/geo-c.warnings create mode 100644 ast_tester/fixtures/stcs/intersection-not.moc create mode 100644 ast_tester/fixtures/stcs/intersection-not.native create mode 100644 ast_tester/fixtures/stcs/intersection-not.out create mode 100644 ast_tester/fixtures/stcs/intersection-not.out-20 create mode 100644 ast_tester/fixtures/stcs/intersection-not.props.native create mode 100644 ast_tester/fixtures/stcs/intersection-not.stcs create mode 100644 ast_tester/fixtures/stcs/intersection-not.warnings create mode 100644 ast_tester/fixtures/stcs/intersection-one-region.error create mode 100644 ast_tester/fixtures/stcs/intersection-one-region.stcs create mode 100644 ast_tester/fixtures/stcs/not-two-regions.error create mode 100644 ast_tester/fixtures/stcs/not-two-regions.stcs create mode 100644 ast_tester/fixtures/stcs/polygon-odd-vertex.error create mode 100644 ast_tester/fixtures/stcs/polygon-odd-vertex.stcs create mode 100644 ast_tester/fixtures/stcs/redshift-error-range.native create mode 100644 ast_tester/fixtures/stcs/redshift-error-range.out create mode 100644 ast_tester/fixtures/stcs/redshift-error-range.out-20 create mode 100644 ast_tester/fixtures/stcs/redshift-error-range.props.native create mode 100644 ast_tester/fixtures/stcs/redshift-error-range.stcs create mode 100644 ast_tester/fixtures/stcs/redshift-error-range.warnings create mode 100644 ast_tester/fixtures/stcs/redshift-radio.native create mode 100644 ast_tester/fixtures/stcs/redshift-radio.out create mode 100644 ast_tester/fixtures/stcs/redshift-radio.out-20 create mode 100644 ast_tester/fixtures/stcs/redshift-radio.props.native create mode 100644 ast_tester/fixtures/stcs/redshift-radio.stcs create mode 100644 ast_tester/fixtures/stcs/redshift-radio.warnings create mode 100644 ast_tester/fixtures/stcs/redshift-relativistic.native create mode 100644 ast_tester/fixtures/stcs/redshift-relativistic.out create mode 100644 ast_tester/fixtures/stcs/redshift-relativistic.out-20 create mode 100644 ast_tester/fixtures/stcs/redshift-relativistic.props.native create mode 100644 ast_tester/fixtures/stcs/redshift-relativistic.stcs create mode 100644 ast_tester/fixtures/stcs/redshift-relativistic.warnings create mode 100644 ast_tester/fixtures/stcs/redshift-unit-hz.native create mode 100644 ast_tester/fixtures/stcs/redshift-unit-hz.out create mode 100644 ast_tester/fixtures/stcs/redshift-unit-hz.out-20 create mode 100644 ast_tester/fixtures/stcs/redshift-unit-hz.props.native create mode 100644 ast_tester/fixtures/stcs/redshift-unit-hz.stcs create mode 100644 ast_tester/fixtures/stcs/redshift-unit-hz.warnings create mode 100644 ast_tester/fixtures/stcs/spectral-error-range.native create mode 100644 ast_tester/fixtures/stcs/spectral-error-range.out create mode 100644 ast_tester/fixtures/stcs/spectral-error-range.out-20 create mode 100644 ast_tester/fixtures/stcs/spectral-error-range.props.native create mode 100644 ast_tester/fixtures/stcs/spectral-error-range.stcs create mode 100644 ast_tester/fixtures/stcs/spectral-error-range.warnings create mode 100644 ast_tester/fixtures/stcs/spectral-moon.native create mode 100644 ast_tester/fixtures/stcs/spectral-moon.out create mode 100644 ast_tester/fixtures/stcs/spectral-moon.out-20 create mode 100644 ast_tester/fixtures/stcs/spectral-moon.props.native create mode 100644 ast_tester/fixtures/stcs/spectral-moon.stcs create mode 100644 ast_tester/fixtures/stcs/spectral-moon.warnings create mode 100644 ast_tester/fixtures/stcs/teb-timescale.moc create mode 100644 ast_tester/fixtures/stcs/teb-timescale.native create mode 100644 ast_tester/fixtures/stcs/teb-timescale.out create mode 100644 ast_tester/fixtures/stcs/teb-timescale.out-20 create mode 100644 ast_tester/fixtures/stcs/teb-timescale.props.native create mode 100644 ast_tester/fixtures/stcs/teb-timescale.stcs create mode 100644 ast_tester/fixtures/stcs/teb-timescale.warnings create mode 100644 ast_tester/fixtures/stcs/time-error-range.native create mode 100644 ast_tester/fixtures/stcs/time-error-range.out create mode 100644 ast_tester/fixtures/stcs/time-error-range.out-20 create mode 100644 ast_tester/fixtures/stcs/time-error-range.props.native create mode 100644 ast_tester/fixtures/stcs/time-error-range.stcs create mode 100644 ast_tester/fixtures/stcs/time-error-range.warnings create mode 100644 ast_tester/fixtures/stcs/time-jd.native create mode 100644 ast_tester/fixtures/stcs/time-jd.out create mode 100644 ast_tester/fixtures/stcs/time-jd.out-20 create mode 100644 ast_tester/fixtures/stcs/time-jd.props.native create mode 100644 ast_tester/fixtures/stcs/time-jd.stcs create mode 100644 ast_tester/fixtures/stcs/time-jd.warnings create mode 100644 ast_tester/fixtures/stcs/timeinterval-unit-m.error create mode 100644 ast_tester/fixtures/stcs/timeinterval-unit-m.stcs create mode 100644 ast_tester/fixtures/stcs/union-no-opening.error create mode 100644 ast_tester/fixtures/stcs/union-no-opening.stcs create mode 100644 ast_tester/fixtures/stcs/union-not-a-region.error create mode 100644 ast_tester/fixtures/stcs/union-not-a-region.stcs create mode 100644 ast_tester/fixtures/stcs/velocity-interval.moc create mode 100644 ast_tester/fixtures/stcs/velocity-interval.native create mode 100644 ast_tester/fixtures/stcs/velocity-interval.out create mode 100644 ast_tester/fixtures/stcs/velocity-interval.out-20 create mode 100644 ast_tester/fixtures/stcs/velocity-interval.props.native create mode 100644 ast_tester/fixtures/stcs/velocity-interval.stcs create mode 100644 ast_tester/fixtures/stcs/velocity-interval.warnings diff --git a/PLAN.md b/PLAN.md index ad7b958d..9d2f0f28 100644 --- a/PLAN.md +++ b/PLAN.md @@ -484,8 +484,9 @@ AST, whose StcsChan is held to the same files. the properties KeyMap read (`.native`, `.props.native`), the warnings (`.warnings`), the STC-S written at Indent 0 and StcsLength 70, Indent 1 and StcsLength 20 and, for an `indent` row, Indent 1 and StcsLength 70 - (`.out`, `.out-20`, `.out-indent`), and that the `.out` text reads back to - an object written as the same text. The comparison is byte for byte on + (`.out`, `.out-20`, `.out-indent`) with the warnings of those writes + (`.write-warnings`), and that each written text reads back to an object + written as the `.out` text. The comparison is byte for byte on Linux x86_64, where the files were captured, and by the rule of `compare_dumps.c`, which it includes, elsewhere. - One ctest per row, `stcs_corpus_`, registered from `corpus.txt` at @@ -494,6 +495,9 @@ AST, whose StcsChan is held to the same files. is rejected by the reader; each is checked for still doing so. - The corpus found the crash fixed in `stcschan.c` for a time sub-phrase starting with `Time` (`time-identifier`). + Documents that still crash the reader (a redshift sub-phrase ending at + `unit` or at its type, and the `SPHER3` and `UNITSPHER` flavours) are + not in the corpus; the Rust port records them. - `teststcschan_c` compares the PROPS KeyMap of its third document with `programs/teststcschan/stcschan-test1-doc3-props.ast` as dump text, as astEqual compares only the class of two KeyMaps; the fixture was diff --git a/ast_tester/fixtures/stcs/README.md b/ast_tester/fixtures/stcs/README.md index 9241881b..08869f22 100644 --- a/ast_tester/fixtures/stcs/README.md +++ b/ast_tester/fixtures/stcs/README.md @@ -1,7 +1,8 @@ # The STC-S corpus -Each document is an STC-S description in `.stcs`, read by the StcsChan of the Rust port and of the C library and held to the expectation files beside it. -The same files, byte for byte, go to `ast_tester/fixtures/stcs/` in the C library's repository, where a C test program checks the C library against them, and the two trees are kept the same. +Each document is an STC-S description in `.stcs`, read by an StcsChan and held to the expectation files beside it. +The same files, byte for byte, are in the Rust port of AST, at `crates/starlink-ast/tests/fixtures/stcs/`, and in the C library, at `ast_tester/fixtures/stcs/`, and the two trees are kept the same. +Two programs check them: `crates/starlink-ast/tests/test_stcschan_corpus.rs` checks the Rust port, and `ast_tester/check_stcs_corpus.c`, one `stcs_corpus_` ctest for each document, checks the C library. ## Layout @@ -11,11 +12,13 @@ The same files, byte for byte, go to `ast_tester/fixtures/stcs/` in the C librar moc=|moc=- stcs=yes|no [indent] ``` -- `moc=`: the document's MOC at that HEALPix order is compared with the one the CDS `moc` crate makes, and is in `.moc`. +- `moc=`: the document's MOC at that HEALPix order is compared with the one the CDS `moc` Rust crate makes, and is in `.moc`. `moc=-`: it is not, because the reader rejects the document or the `moc` crate refuses it (the comment says why). -- `stcs=yes|no`: whether the CDS `stc-s` crate parses the document by the IVOA grammar; a `no` names the grammar point in the comment. +- `stcs=yes|no`: whether the CDS `stc-s` Rust crate parses the document by the IVOA grammar; a `no` names the grammar point in the comment. - `indent`: the document is also written back with Indent set at the default StcsLength, as `.out-indent`. +The C checker reads the name and the `indent` field; the `moc` and `stcs` fields are for the Rust port's checks against the CDS crates. + The expectation files of a document the reader rejects: - `.error`: the C name of the error code (such as `AST__BADIN`) on its first line, and the message on its second. @@ -25,47 +28,53 @@ Those of any other document: - `.native`: the Native dump of what the document reads to with StcsArea, StcsCoords and StcsProps all set, a KeyMap holding `AREA`, `COORDS` and `PROPS` where the document has them. - `.props.native`: the Native dump of the properties KeyMap the document reads to with StcsProps alone. - `.warnings`: the warnings of the read with all three attributes set, at ReportLevel 3, one per line; the file is empty when there are none. -- `.out`: the text a StcsChan writes for that object with Indent 0 and StcsLength 70, each line as the sink receives it, trailing space included, followed by a newline. +- `.out`: the text an StcsChan writes for that object with Indent 0 and StcsLength 70, each line as the sink receives it, trailing space included, followed by a newline. - `.out-20`: the same written with Indent 1 and StcsLength 20; StcsLength is ignored when Indent is zero, so this variant is written with Indent set. - `.out-indent`, for a row that says `indent`: the same written with Indent 1 and StcsLength 70. +- `.write-warnings`, for a document whose writes give warnings: those warnings, at ReportLevel 3, one per line, which each of the writes above gives; a document without this file is written without a warning. And of a document with `moc=`: -- `.moc`: the MOC the CDS `moc` crate's `stcs2moc` makes from the document at that order, in its ASCII serialization and nothing else, so Aladin and MOCPy read it. +- `.moc`: the MOC the CDS `moc` crate's `stcs2moc` makes from the document at that order, in its ASCII form and nothing else, so Aladin and MOCPy read it. The dumps use the extension `.native`, not `.ast`, because every `.ast` file in the fixture tree is taken for a transform fixture by the transform oracle's coverage test. ## Comparison -A document reads as its expectations when its read fails with the error in its `.error` file, or when its dumps match its `.native` and `.props.native` files and its warnings match its `.warnings` file exactly. -The files were captured on Linux x86_64, where they are byte for byte what the C library at the pin dumps, and there the dumps must be identical to them. -On any other platform a numeric token may also differ from the file's within libm rounding (a relative 1e-13 with an absolute floor of 1e-14, as `c_text_eq` in `crates/starlink-ast/tests/common/mod.rs` allows), every other token being compared exactly. -The project's other golden files are captured on macOS; recapturing this corpus there would bring it to that convention. +A document reads as its expectations when its read fails with the error in its `.error` file, or when its dumps match its `.native` and `.props.native` files and its warnings match its `.warnings` file. +The C checker takes the message of an `.error` file to be the first one the error reporting receives after the context message that names the calling routine. + +A document writes as its expectations when the text written for the object it reads to is its `.out`, `.out-20` and, where the row says `indent`, `.out-indent` file, each write writes one object, and each gives the warnings of its `.write-warnings` file, or none. +Each of those texts must also read back to an object that is written, at Indent 0 and StcsLength 70, as the `.out` text. +The dump of that object is not compared with `.native`, as it differs in C as in the port: the written text holds the words the writer supplies by default, such as `TOPOCENTER`, which the properties KeyMap then records. + +The files were captured on Linux x86_64, where they are byte for byte what the C library writes, and there the dumps and the written texts must be identical to them, trailing spaces included. +On any other platform a number may also differ in its last digits from the one in the file, as the system's mathematics library may round differently: the Rust port allows a number to differ within its `within_libm_rounding` (a relative 1e-13 with an absolute floor of 1e-14), and the C checker allows two numbers to differ by at most the 4 units in the last place of `compare_dumps.c`. +Every other token is compared exactly everywhere, and the white space too: the C checker compares the tokens of a line separated by any white space, and the Rust port those separated by single spaces, so that the Rust port also sees a trailing space off Linux x86_64. +The warnings and the error messages are compared exactly everywhere. -A document writes as its expectations when the text written for the object it reads to is its `.out`, `.out-20` and, where the row says `indent`, `.out-indent` file, and one object is written. -The written files were captured on Linux x86_64, where they are byte for byte, trailing spaces included, what the C library at the pin writes for the object it reads, and there the text must be identical to them; elsewhere a numeric token may differ within libm rounding, as for the dumps. -The `.out` text must also read back to an object that is written as the same text. -Its dump is not compared with `.native`, as it differs in C as in the port: the written text holds the words the writer supplies by default, such as `TOPOCENTER`, which the properties KeyMap then records. -Two documents are listed, with the reason, in `crates/starlink-ast/tests/test_stcschan_corpus.rs`: `timeinterval-allsky`, in `WRITES_NOTHING_EXCLUDED`, writes nothing, so its `.out` files are empty, and `position`, in `READ_BACK_EXCLUDED`, writes text the reader rejects; both are what C does. +Two documents are checked for what they do instead, each listed by name with the reason in both programs. +`timeinterval-allsky`, in `WRITES_NOTHING_EXCLUDED`, writes no object, so its `.out` files are empty and it is not read back; its writes still give the warnings of its `.write-warnings` file. +`position`, in `READ_BACK_EXCLUDED`, writes text the reader rejects, and that text must still fail to read with `AST__BADIN`. +Each program fails when either document starts to behave like the others. -For a document with `moc=`, the Moc the port makes at that order from the Region the document reads to with StcsArea alone, with MinOrder equal to MaxOrder, may differ from the CDS MOC only in the cells either side of the CDS MOC's boundary (its external and internal borders). -The CDS MOC must also be the one in the `.moc` file, so that a change in the crate's rasterization is seen. -A document whose cells differ elsewhere is listed, with the reason, in `CDS_MOC_EXCLUDED` in `crates/starlink-ast/tests/test_stcschan_corpus.rs`. +For a document with `moc=`, the Rust port checks that the Moc it makes at that order from the Region the document reads to with StcsArea alone, with MinOrder equal to MaxOrder, differs from the CDS MOC only in the cells either side of the CDS MOC's boundary (its external and internal borders). +The CDS MOC must also be the one in the `.moc` file, so that a change in the cells the crate chooses is seen. +A document whose cells differ elsewhere is listed, with the reason, in `CDS_MOC_EXCLUDED` in `test_stcschan_corpus.rs`. ## Notes on documents -- `time-identifier` starts its time sub-phrase with the identifier `Time`, which crashes the C library at the pin, as `timeid = TIME_ID;` at `stcschan.c:3715` is inside a comment. - Its expectation files were written by the port and checked, byte for byte, against the C library built with that one line moved out of the comment. - The fix goes upstream with these files; until it lands, the C test program cannot pass on this document. +- `time-identifier` starts its time sub-phrase with the identifier `Time`, which crashed the C library before `timeid = TIME_ID;` in `ReadProps` was moved out of the comment that held it (`stcschan.c`, 3 December 2026). - `timeinterval-allsky` reads to an Interval whose sky axes are unbounded, which the C library cannot write as a PositionInterval, so it writes nothing, with a warning for each limit of the first axis. - `position` is written with its position twice, `Position ICRS TOPOCENTER 10 20 10 20`, which the reader rejects. +- A redshift sub-phrase at the end of a document never ends with a unit or with `VELOCITY` or `REDSHIFT`, and no document has `SPHER3` or `UNITSPHER` after its frame, as the C library crashes on each. ## Regenerating -The expectation files are written by the port and the CDS crates: +The expectation files are written by the Rust port and the CDS crates: ```shell STCS_CORPUS_WRITE=1 cargo test -p starlink-ast --test regions test_stcschan_corpus::write_expectations -- --ignored ``` -A regenerated file that differs from the committed one is a change in what the reader or the writer does, to be explained before it is committed. +A regenerated file that differs from the committed one is a change in what the reader or the writer does, to be explained before it is committed, and every new or changed file must pass `check_stcs_corpus` against the C library before it is. diff --git a/ast_tester/fixtures/stcs/box-cart1.error b/ast_tester/fixtures/stcs/box-cart1.error new file mode 100644 index 00000000..75aab077 --- /dev/null +++ b/ast_tester/fixtures/stcs/box-cart1.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): Supplied space frame has 1 axes. diff --git a/ast_tester/fixtures/stcs/box-cart1.stcs b/ast_tester/fixtures/stcs/box-cart1.stcs new file mode 100644 index 00000000..62c14592 --- /dev/null +++ b/ast_tester/fixtures/stcs/box-cart1.stcs @@ -0,0 +1 @@ +Box CART1 10 4 diff --git a/ast_tester/fixtures/stcs/box-cart2-units.native b/ast_tester/fixtures/stcs/box-cart2-units.native new file mode 100644 index 00000000..a5268262 --- /dev/null +++ b/ast_tester/fixtures/stcs/box-cart2-units.native @@ -0,0 +1,98 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Polygon # Polygonal region +# Title = "2-d coordinate system" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "UNKNOWNFRAME" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Axis 1" # Label for axis 1 +# Lbl2 = "Axis 2" # Label for axis 2 +# System = "Cartesian" # Coordinate system type +# Uni1 = "m" # Units for axis 1 (metre) +# Uni2 = "km" # Units for axis 2 + ActUnt = 1 # Unit strings affects alignment + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin Frame # Coordinate system description +# Title = "2-d coordinate system" # Title of coordinate system + Naxes = 2 # Number of coordinate axes + Domain = "UNKNOWNFRAME" # Coordinate system domain +# Lbl1 = "Axis 1" # Label for axis 1 +# Lbl2 = "Axis 2" # Label for axis 2 +# Uni1 = "m" # Units for axis 1 (metre) +# Uni2 = "km" # Units for axis 2 + ActUnt = 1 # Unit strings affects alignment + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "m" # Axis units (metre) + End Axis + Ax2 = # Axis number 2 + Begin Axis # Coordinate axis + Unit = "km" # Axis units + End Axis + End Frame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 4 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 8 # Coordinate values... + X2 = 17 + X3 = 12 + X4 = 17 + X5 = 12 + X6 = 23 + X7 = 8 + X8 = 23 + End PointSet + IsA Region # An area within a coordinate system + Order = 1 # Polygon uses STC vertex order convention + End Polygon + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 16 # Total member count + Key1 = "BSIZE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "4 6" # Item value + Key2 = "CENTRE" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "10 20" # Item value + Key3 = "DBSIZE" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 2 # Vector length + V3_1 = 4 # Item values + V3_2 = 6 + Key4 = "DCENTRE" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 2 # Vector length + V4_1 = 10 # Item values + V4_2 = 20 + Key5 = "FLAVOR" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "CART2" # Item value + Key6 = "FLAVOUR" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "CART2" # Item value + Key7 = "ID" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "Box" # Item value + Key8 = "UNIT" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "m km" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/box-cart2-units.out b/ast_tester/fixtures/stcs/box-cart2-units.out new file mode 100644 index 00000000..dc175bec --- /dev/null +++ b/ast_tester/fixtures/stcs/box-cart2-units.out @@ -0,0 +1 @@ +Polygon UNKNOWNFrame TOPOCENTER CART2 8 17 12 17 12 23 8 23 unit m km diff --git a/ast_tester/fixtures/stcs/box-cart2-units.out-20 b/ast_tester/fixtures/stcs/box-cart2-units.out-20 new file mode 100644 index 00000000..e5ade9fc --- /dev/null +++ b/ast_tester/fixtures/stcs/box-cart2-units.out-20 @@ -0,0 +1,4 @@ +Polygon UNKNOWNFrame + TOPOCENTER CART2 + 8 17 12 17 12 23 + 8 23 unit m km diff --git a/ast_tester/fixtures/stcs/box-cart2-units.props.native b/ast_tester/fixtures/stcs/box-cart2-units.props.native new file mode 100644 index 00000000..060c633a --- /dev/null +++ b/ast_tester/fixtures/stcs/box-cart2-units.props.native @@ -0,0 +1,40 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 16 # Total member count + Key1 = "BSIZE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "4 6" # Item value + Key2 = "CENTRE" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "10 20" # Item value + Key3 = "DBSIZE" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 2 # Vector length + V3_1 = 4 # Item values + V3_2 = 6 + Key4 = "DCENTRE" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 2 # Vector length + V4_1 = 10 # Item values + V4_2 = 20 + Key5 = "FLAVOR" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "CART2" # Item value + Key6 = "FLAVOUR" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "CART2" # Item value + Key7 = "ID" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "Box" # Item value + Key8 = "UNIT" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "m km" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/box-cart2-units.stcs b/ast_tester/fixtures/stcs/box-cart2-units.stcs new file mode 100644 index 00000000..baad43b7 --- /dev/null +++ b/ast_tester/fixtures/stcs/box-cart2-units.stcs @@ -0,0 +1 @@ +Box CART2 10 20 4 6 unit m km diff --git a/ast_tester/fixtures/stcs/box-cart2-units.warnings b/ast_tester/fixtures/stcs/box-cart2-units.warnings new file mode 100644 index 00000000..8ed942a0 --- /dev/null +++ b/ast_tester/fixtures/stcs/box-cart2-units.warnings @@ -0,0 +1 @@ +Space frame defaulting to 'UNKNOWNFrame' in an STC-S description. diff --git a/ast_tester/fixtures/stcs/box-cart2-units.write-warnings b/ast_tester/fixtures/stcs/box-cart2-units.write-warnings new file mode 100644 index 00000000..d0bd0b62 --- /dev/null +++ b/ast_tester/fixtures/stcs/box-cart2-units.write-warnings @@ -0,0 +1 @@ +'UNKNOWNFrame' being used in place of unsupported frame 'UNKNOWNFRAME'. diff --git a/ast_tester/fixtures/stcs/box-cart3.error b/ast_tester/fixtures/stcs/box-cart3.error new file mode 100644 index 00000000..fca120ca --- /dev/null +++ b/ast_tester/fixtures/stcs/box-cart3.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): Supplied space frame has 3 axes. diff --git a/ast_tester/fixtures/stcs/box-cart3.stcs b/ast_tester/fixtures/stcs/box-cart3.stcs new file mode 100644 index 00000000..c7dc8b87 --- /dev/null +++ b/ast_tester/fixtures/stcs/box-cart3.stcs @@ -0,0 +1 @@ +Box CART3 10 20 30 4 6 7 diff --git a/ast_tester/fixtures/stcs/box-missing-bsize.error b/ast_tester/fixtures/stcs/box-missing-bsize.error new file mode 100644 index 00000000..4b4b98f6 --- /dev/null +++ b/ast_tester/fixtures/stcs/box-missing-bsize.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): Expected another 'bsize' value for a Box, but found '' in an STC-S description: 'Box ICRS 10 20 4'. diff --git a/ast_tester/fixtures/stcs/box-missing-bsize.stcs b/ast_tester/fixtures/stcs/box-missing-bsize.stcs new file mode 100644 index 00000000..06bf9f15 --- /dev/null +++ b/ast_tester/fixtures/stcs/box-missing-bsize.stcs @@ -0,0 +1 @@ +Box ICRS 10 20 4 diff --git a/ast_tester/fixtures/stcs/circle-error-range.moc b/ast_tester/fixtures/stcs/circle-error-range.moc new file mode 100644 index 00000000..20e63248 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-error-range.moc @@ -0,0 +1,4 @@ +6/19861 19863 +7/79443 79449 79451 79476-79477 79618 79624 79626 +8/317767 317771 317793 317795 317801 317892-317893 318466 318478 318500 318502 + 318508 318510 318592-318594 diff --git a/ast_tester/fixtures/stcs/circle-error-range.native b/ast_tester/fixtures/stcs/circle-error-range.native new file mode 100644 index 00000000..d1cf7d9a --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-error-range.native @@ -0,0 +1,125 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.19310635074456914 + X4 = 0.34906250706369762 + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.17824760214302654 + X4 = 0.35429962093518708 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End Circle + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "DERROR" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 4 # Vector length + V3_1 = 0.10000000000000001 # Item values + V3_2 = 0.20000000000000001 + V3_3 = 0.29999999999999999 + V3_4 = 0.40000000000000002 + Key4 = "ERROR" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "0.1 0.2 0.3 0.4" # Item value + Key5 = "FRAME" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "ICRS" # Item value + Key6 = "ID" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "Circle" # Item value + Key7 = "RADIUS" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "1" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/circle-error-range.out b/ast_tester/fixtures/stcs/circle-error-range.out new file mode 100644 index 00000000..44dd7700 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-error-range.out @@ -0,0 +1 @@ +Circle ICRS TOPOCENTER 10 20 1 Error 0.2 0.3 diff --git a/ast_tester/fixtures/stcs/circle-error-range.out-20 b/ast_tester/fixtures/stcs/circle-error-range.out-20 new file mode 100644 index 00000000..b4c09c45 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-error-range.out-20 @@ -0,0 +1,3 @@ +Circle ICRS + TOPOCENTER 10 20 + 1 Error 0.2 0.3 diff --git a/ast_tester/fixtures/stcs/circle-error-range.props.native b/ast_tester/fixtures/stcs/circle-error-range.props.native new file mode 100644 index 00000000..22c2c91b --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-error-range.props.native @@ -0,0 +1,39 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "DERROR" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 4 # Vector length + V3_1 = 0.10000000000000001 # Item values + V3_2 = 0.20000000000000001 + V3_3 = 0.29999999999999999 + V3_4 = 0.40000000000000002 + Key4 = "ERROR" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "0.1 0.2 0.3 0.4" # Item value + Key5 = "FRAME" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "ICRS" # Item value + Key6 = "ID" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "Circle" # Item value + Key7 = "RADIUS" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "1" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/circle-error-range.stcs b/ast_tester/fixtures/stcs/circle-error-range.stcs new file mode 100644 index 00000000..9188e062 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-error-range.stcs @@ -0,0 +1 @@ +Circle ICRS 10 20 1 Error 0.1 0.2 0.3 0.4 diff --git a/ast_tester/fixtures/stcs/circle-error-range.warnings b/ast_tester/fixtures/stcs/circle-error-range.warnings new file mode 100644 index 00000000..1909b402 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-error-range.warnings @@ -0,0 +1,2 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. +An STC-S space sub-phrase contains an Error range. AST does not support error ranges so the mid value will be used as the error. diff --git a/ast_tester/fixtures/stcs/circle-position-error.moc b/ast_tester/fixtures/stcs/circle-position-error.moc new file mode 100644 index 00000000..20e63248 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-position-error.moc @@ -0,0 +1,4 @@ +6/19861 19863 +7/79443 79449 79451 79476-79477 79618 79624 79626 +8/317767 317771 317793 317795 317801 317892-317893 318466 318478 318500 318502 + 318508 318510 318592-318594 diff --git a/ast_tester/fixtures/stcs/circle-position-error.native b/ast_tester/fixtures/stcs/circle-position-error.native new file mode 100644 index 00000000..0e8fcdc1 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-position-error.native @@ -0,0 +1,207 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.19310635074456914 + X4 = 0.34906250706369762 + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.19310580025172511 + X4 = 0.36646371593452304 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End Circle + Key2 = "COORDS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin PointList # Collection of points +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.19310580025172511 + X4 = 0.36646371593452304 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End PointList + Key3 = "PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 18 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "DERROR" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 1 # Item values + Key4 = "DPOSITION" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 2 # Vector length + V4_1 = 10 # Item values + V4_2 = 20 + Key5 = "ERROR" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1" # Item value + Key6 = "FRAME" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "ICRS" # Item value + Key7 = "ID" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "Circle" # Item value + Key8 = "POSITION" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "10 20" # Item value + Key9 = "RADIUS" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "1" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/circle-position-error.out b/ast_tester/fixtures/stcs/circle-position-error.out new file mode 100644 index 00000000..fd20c781 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-position-error.out @@ -0,0 +1 @@ +Circle ICRS TOPOCENTER 10 20 1 Position 10 20 Error 1 1 diff --git a/ast_tester/fixtures/stcs/circle-position-error.out-20 b/ast_tester/fixtures/stcs/circle-position-error.out-20 new file mode 100644 index 00000000..fc52ec1a --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-position-error.out-20 @@ -0,0 +1,4 @@ +Circle ICRS + TOPOCENTER 10 20 + 1 Position 10 20 + Error 1 1 diff --git a/ast_tester/fixtures/stcs/circle-position-error.props.native b/ast_tester/fixtures/stcs/circle-position-error.props.native new file mode 100644 index 00000000..03699668 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-position-error.props.native @@ -0,0 +1,44 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 18 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "DERROR" # Item name + Typ3 = 2 # Item data type (double) + Nel3 = 1 # Vector length + V3_1 = 1 # Item values + Key4 = "DPOSITION" # Item name + Typ4 = 2 # Item data type (double) + Nel4 = 2 # Vector length + V4_1 = 10 # Item values + V4_2 = 20 + Key5 = "ERROR" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1" # Item value + Key6 = "FRAME" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "ICRS" # Item value + Key7 = "ID" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "Circle" # Item value + Key8 = "POSITION" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "10 20" # Item value + Key9 = "RADIUS" # Item name + Typ9 = 3 # Item data type (string) + Val9 = "1" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/circle-position-error.stcs b/ast_tester/fixtures/stcs/circle-position-error.stcs new file mode 100644 index 00000000..d4265b73 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-position-error.stcs @@ -0,0 +1 @@ +Circle ICRS 10 20 1 Position 10 20 Error 1 diff --git a/ast_tester/fixtures/stcs/circle-position-error.warnings b/ast_tester/fixtures/stcs/circle-position-error.warnings new file mode 100644 index 00000000..29457709 --- /dev/null +++ b/ast_tester/fixtures/stcs/circle-position-error.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/corpus.txt b/ast_tester/fixtures/stcs/corpus.txt index 8a7ddbe3..3e5ae8c7 100644 --- a/ast_tester/fixtures/stcs/corpus.txt +++ b/ast_tester/fixtures/stcs/corpus.txt @@ -33,3 +33,34 @@ nested-intersection-difference moc=- stcs=yes # an Intersection holding a Dif spectral-interval moc=- stcs=yes # no space sub-phrase redshift-interval moc=- stcs=yes # no space sub-phrase time-identifier moc=- stcs=yes # no space sub-phrase; a time sub-phrase starting with 'Time', which crashes the C library at 37f52a20 (stcschan.c:3715 has 'timeid = TIME_ID;' inside a comment); the expectations are the port's, checked against C with that line fixed (README.md) +# +# A document for each reader path the documents above do not reach. +velocity-interval moc=8 stcs=yes # a velocity sub-phrase, which is read and ignored with a warning +time-jd moc=- stcs=yes # no space sub-phrase; JD times, one without a decimal point, which is written with a "%d" format +time-error-range moc=- stcs=yes # no space sub-phrase; a time Error range +geo-c moc=- stcs=yes # GEO_C, read as UNKNOWNFrame with a warning; the moc crate refuses frames other than ICRS +spectral-moon moc=- stcs=yes # no space sub-phrase; a spectral reference position AST does not support +redshift-radio moc=- stcs=yes # no space sub-phrase; a RADIO redshift, read as OPTICAL with a warning +redshift-unit-hz moc=- stcs=no # no space sub-phrase; units on a redshift, which are ignored with a warning; the stc-s crate allows only a velocity unit for a redshift +redshift-error-range moc=- stcs=yes # no space sub-phrase; a redshift Error range +timeinterval-unit-m moc=- stcs=no # AST__BADIN: a unit the time axis does not support; the stc-s crate allows only a time unit +circle-error-range moc=8 stcs=yes # a space Error range, a lower and an upper value for each axis (fewer reads memory C never set; c-library-quirks.md) +spectral-error-range moc=- stcs=yes # no space sub-phrase; a spectral Error range +redshift-relativistic moc=- stcs=yes # no space sub-phrase; a RELATIVISTIC redshift +circle-position-error moc=8 stcs=yes # a Position with an Error after the Circle +teb-timescale moc=8 stcs=yes # the TEB time scale, read as TDB with a warning, and the defaults of the other sub-phrases +box-cart2-units moc=- stcs=yes # per-axis units in a basic Frame, written with a warning; the moc crate refuses every Box (see adass2010-figure1) +box-cart1 moc=- stcs=yes # AST__BADIN: a Box needs two space axes +box-cart3 moc=- stcs=yes # AST__BADIN: a Box needs two space axes +ellipse-cart2 moc=- stcs=yes # an Ellipse in a basic Frame, whose angle is measured from the second axis, written with a warning; the moc crate refuses frames other than ICRS +intersection-not moc=8 stcs=yes +difference moc=8 stcs=yes +# +# Errors in the arguments of a spatial region. +box-missing-bsize moc=- stcs=yes # AST__BADIN: a Box with three values; the stc-s crate does not count them +polygon-odd-vertex moc=- stcs=yes # AST__BADIN: a Polygon whose last vertex has one value; the stc-s crate does not count them +ellipse-missing-angle moc=- stcs=yes # AST__BADIN: an Ellipse without its position angle; the stc-s crate does not count its values +union-no-opening moc=- stcs=no # AST__BADIN: a Union without its opening parenthesis, which the grammar requires +union-not-a-region moc=- stcs=no # AST__BADIN: a word in a Union that is not a region; the grammar has no such word +intersection-one-region moc=- stcs=yes # AST__BADIN: an Intersection of one region; the stc-s crate does not count them +not-two-regions moc=- stcs=no # AST__BADIN: a Not of two regions, where the grammar has one diff --git a/ast_tester/fixtures/stcs/difference.moc b/ast_tester/fixtures/stcs/difference.moc new file mode 100644 index 00000000..1650a043 --- /dev/null +++ b/ast_tester/fixtures/stcs/difference.moc @@ -0,0 +1,9 @@ +6/19860 19862 19868-19869 19912 +7/79097-79102 79429 79431 79437 79439 79452 79454-79455 79461 79481 79484-79485 + 79626-79628 79630 79652 79656 +8/316349-316351 316386-316387 316412-316414 317088 317090-317091 317094 + 317096-317097 317100-317101 317103 317114 317715 317721 317723 317745 317747 + 317753 317755 317776-317778 317784 317786 317814 317841 317852-317853 317855 + 317920-317921 317945 317948 318480-318481 318483 318486 318489 318491-318492 + 318494 318503 318516 318518 318524 318526 318612 318614 318616-318618 + 318628-318630 diff --git a/ast_tester/fixtures/stcs/difference.native b/ast_tester/fixtures/stcs/difference.native new file mode 100644 index 00000000..9ca67902 --- /dev/null +++ b/ast_tester/fixtures/stcs/difference.native @@ -0,0 +1,218 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.21167989382959951 + X4 = 0.34905247531633071 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Negate = 1 # Region negated + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.19198621771937624 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.21055964326451246 + X4 = 0.34906250706369762 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End CmpRegion + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Difference" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 2 # Item value + Key4 = "REGION1" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2" # Item value + End KeyMap + Key5 = "REGION2" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "11 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 11 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1" # Item value + End KeyMap + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/difference.out b/ast_tester/fixtures/stcs/difference.out new file mode 100644 index 00000000..b0e73c42 --- /dev/null +++ b/ast_tester/fixtures/stcs/difference.out @@ -0,0 +1 @@ +Intersection ICRS TOPOCENTER ( Circle 10 20 2 Not ( Circle 11 20 1 ) ) diff --git a/ast_tester/fixtures/stcs/difference.out-20 b/ast_tester/fixtures/stcs/difference.out-20 new file mode 100644 index 00000000..52b98384 --- /dev/null +++ b/ast_tester/fixtures/stcs/difference.out-20 @@ -0,0 +1,8 @@ +Intersection ICRS + TOPOCENTER ( + Circle 10 20 2 + Not ( + Circle 11 + 20 1 + ) + ) diff --git a/ast_tester/fixtures/stcs/difference.props.native b/ast_tester/fixtures/stcs/difference.props.native new file mode 100644 index 00000000..45b1b343 --- /dev/null +++ b/ast_tester/fixtures/stcs/difference.props.native @@ -0,0 +1,65 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Difference" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 2 # Item value + Key4 = "REGION1" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2" # Item value + End KeyMap + Key5 = "REGION2" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "11 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 11 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/difference.stcs b/ast_tester/fixtures/stcs/difference.stcs new file mode 100644 index 00000000..29acfc23 --- /dev/null +++ b/ast_tester/fixtures/stcs/difference.stcs @@ -0,0 +1 @@ +Difference ICRS ( Circle 10 20 2 Circle 11 20 1 ) diff --git a/ast_tester/fixtures/stcs/difference.warnings b/ast_tester/fixtures/stcs/difference.warnings new file mode 100644 index 00000000..29457709 --- /dev/null +++ b/ast_tester/fixtures/stcs/difference.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/ellipse-cart2.native b/ast_tester/fixtures/stcs/ellipse-cart2.native new file mode 100644 index 00000000..dd83c7cd --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse-cart2.native @@ -0,0 +1,93 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Ellipse # Elliptical region +# Title = "2-d coordinate system" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "UNKNOWNFRAME" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Axis 1" # Label for axis 1 +# Lbl2 = "Axis 2" # Label for axis 2 +# System = "Cartesian" # Coordinate system type +# Uni1 = "m" # Units for axis 1 (metre) +# Uni2 = "m" # Units for axis 2 (metre) + ActUnt = 1 # Unit strings affects alignment + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin Frame # Coordinate system description +# Title = "2-d coordinate system" # Title of coordinate system + Naxes = 2 # Number of coordinate axes + Domain = "UNKNOWNFRAME" # Coordinate system domain +# Lbl1 = "Axis 1" # Label for axis 1 +# Lbl2 = "Axis 2" # Label for axis 2 +# Uni1 = "m" # Units for axis 1 (metre) +# Uni2 = "m" # Units for axis 2 (metre) + ActUnt = 1 # Unit strings affects alignment + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "m" # Axis units (metre) + End Axis + Ax2 = # Axis number 2 + Begin Axis # Coordinate axis + Unit = "m" # Axis units (metre) + End Axis + End Frame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 3 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 10 # Coordinate values... + X2 = 20 + X3 = 12.999999999999982 + X4 = 14.803847577293354 + X5 = 6.5358983848622447 + X6 = 18.000000000000018 + End PointSet + IsA Region # An area within a coordinate system + End Ellipse + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 16 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FLAVOR" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "CART2" # Item value + Key4 = "FLAVOUR" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "CART2" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "Ellipse" # Item value + Key6 = "POSANGLE" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "30" # Item value + Key7 = "RADIUS1" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "4" # Item value + Key8 = "RADIUS2" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "6" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/ellipse-cart2.out b/ast_tester/fixtures/stcs/ellipse-cart2.out new file mode 100644 index 00000000..9cb00f28 --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse-cart2.out @@ -0,0 +1 @@ +Ellipse UNKNOWNFrame TOPOCENTER CART2 10 20 6 4 300 unit m diff --git a/ast_tester/fixtures/stcs/ellipse-cart2.out-20 b/ast_tester/fixtures/stcs/ellipse-cart2.out-20 new file mode 100644 index 00000000..af79bc89 --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse-cart2.out-20 @@ -0,0 +1,4 @@ +Ellipse UNKNOWNFrame + TOPOCENTER CART2 + 10 20 6 4 300 + unit m diff --git a/ast_tester/fixtures/stcs/ellipse-cart2.props.native b/ast_tester/fixtures/stcs/ellipse-cart2.props.native new file mode 100644 index 00000000..8b6af8da --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse-cart2.props.native @@ -0,0 +1,38 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 16 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FLAVOR" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "CART2" # Item value + Key4 = "FLAVOUR" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "CART2" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "Ellipse" # Item value + Key6 = "POSANGLE" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "30" # Item value + Key7 = "RADIUS1" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "4" # Item value + Key8 = "RADIUS2" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "6" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/ellipse-cart2.stcs b/ast_tester/fixtures/stcs/ellipse-cart2.stcs new file mode 100644 index 00000000..61993d03 --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse-cart2.stcs @@ -0,0 +1 @@ +Ellipse CART2 10 20 4 6 30 diff --git a/ast_tester/fixtures/stcs/ellipse-cart2.warnings b/ast_tester/fixtures/stcs/ellipse-cart2.warnings new file mode 100644 index 00000000..8ed942a0 --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse-cart2.warnings @@ -0,0 +1 @@ +Space frame defaulting to 'UNKNOWNFrame' in an STC-S description. diff --git a/ast_tester/fixtures/stcs/ellipse-cart2.write-warnings b/ast_tester/fixtures/stcs/ellipse-cart2.write-warnings new file mode 100644 index 00000000..d0bd0b62 --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse-cart2.write-warnings @@ -0,0 +1 @@ +'UNKNOWNFrame' being used in place of unsupported frame 'UNKNOWNFRAME'. diff --git a/ast_tester/fixtures/stcs/ellipse-missing-angle.error b/ast_tester/fixtures/stcs/ellipse-missing-angle.error new file mode 100644 index 00000000..6890e4cc --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse-missing-angle.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): Expected the position angle value for an Ellipse, but found '' in an STC-S description: 'Ellipse ICRS 10 20 4 6'. diff --git a/ast_tester/fixtures/stcs/ellipse-missing-angle.stcs b/ast_tester/fixtures/stcs/ellipse-missing-angle.stcs new file mode 100644 index 00000000..8c433f77 --- /dev/null +++ b/ast_tester/fixtures/stcs/ellipse-missing-angle.stcs @@ -0,0 +1 @@ +Ellipse ICRS 10 20 4 6 diff --git a/ast_tester/fixtures/stcs/geo-c.native b/ast_tester/fixtures/stcs/geo-c.native new file mode 100644 index 00000000..a552da8b --- /dev/null +++ b/ast_tester/fixtures/stcs/geo-c.native @@ -0,0 +1,88 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Circle # Circular or spherical region +# Title = "Spherical coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Longitude" # Label for axis 1 +# Lbl2 = "Latitude" # Label for axis 2 +# System = "Unknown" # Coordinate system type +# Uni1 = "degrees" # Units for axis 1 +# Uni2 = "degrees" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "Spherical coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Longitude" # Label for axis 1 +# Lbl2 = "Latitude" # Label for axis 2 + System = "Unknown" # Coordinate system type +# Uni1 = "degrees" # Units for axis 1 +# Uni2 = "degrees" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.19310635074456914 + X4 = 0.34906250706369762 + End PointSet + IsA Region # An area within a coordinate system + End Circle + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "GEO_C" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Circle" # Item value + Key5 = "RADIUS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/geo-c.out b/ast_tester/fixtures/stcs/geo-c.out new file mode 100644 index 00000000..b4ab714b --- /dev/null +++ b/ast_tester/fixtures/stcs/geo-c.out @@ -0,0 +1 @@ +Circle UNKNOWNFrame TOPOCENTER 10 20 1 diff --git a/ast_tester/fixtures/stcs/geo-c.out-20 b/ast_tester/fixtures/stcs/geo-c.out-20 new file mode 100644 index 00000000..58cdaa06 --- /dev/null +++ b/ast_tester/fixtures/stcs/geo-c.out-20 @@ -0,0 +1,3 @@ +Circle UNKNOWNFrame + TOPOCENTER 10 20 + 1 diff --git a/ast_tester/fixtures/stcs/geo-c.props.native b/ast_tester/fixtures/stcs/geo-c.props.native new file mode 100644 index 00000000..c8bb3a70 --- /dev/null +++ b/ast_tester/fixtures/stcs/geo-c.props.native @@ -0,0 +1,29 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "GEO_C" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Circle" # Item value + Key5 = "RADIUS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/geo-c.stcs b/ast_tester/fixtures/stcs/geo-c.stcs new file mode 100644 index 00000000..7582b4b8 --- /dev/null +++ b/ast_tester/fixtures/stcs/geo-c.stcs @@ -0,0 +1 @@ +Circle GEO_C 10 20 1 diff --git a/ast_tester/fixtures/stcs/geo-c.warnings b/ast_tester/fixtures/stcs/geo-c.warnings new file mode 100644 index 00000000..8b8e0756 --- /dev/null +++ b/ast_tester/fixtures/stcs/geo-c.warnings @@ -0,0 +1,2 @@ +'UNKNOWNFrame' being used in place of unsupported frame 'GEO_C' in an STC-S description. +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/intersection-not.moc b/ast_tester/fixtures/stcs/intersection-not.moc new file mode 100644 index 00000000..1ff46c96 --- /dev/null +++ b/ast_tester/fixtures/stcs/intersection-not.moc @@ -0,0 +1,9 @@ +6/19775 19868 19912 +7/79097-79099 79274-79275 79429 79431 79437 79439-79442 79445 79448 79450 79461 + 79478-79479 79481 79484-79485 79616-79617 79619-79620 79622 79625 79627-79628 + 79630 79652 79656 +8/316349-316351 316386-316387 317088 317090-317091 317094 317114 317715 317721 + 317723 317745 317747 317753 317755 317772-317774 317776-317778 317804 317806 + 317841 317852-317853 317855 317904 317906-317907 317910-317911 317920-317921 + 317945 317948 318472-318473 318475 318486 318492 318494 318507 318516 318518 + 318524 318526 318612 318614 318616-318618 318628-318630 diff --git a/ast_tester/fixtures/stcs/intersection-not.native b/ast_tester/fixtures/stcs/intersection-not.native new file mode 100644 index 00000000..7a6e9e6a --- /dev/null +++ b/ast_tester/fixtures/stcs/intersection-not.native @@ -0,0 +1,186 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin CmpRegion # Combination of two Regions +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + RegAxes = 2 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + Operator = 1 # Regions combined using Boolean AND + RegionA = # First component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.21167989382959951 + X4 = 0.34905247531633071 + End PointSet + IsA Region # An area within a coordinate system + End Circle + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Negate = 1 # Region negated + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.19310635074456914 + X4 = 0.34906250706369762 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End CmpRegion + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Intersection" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 2 # Item value + Key4 = "REGION1" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2" # Item value + End KeyMap + Key5 = "REGION2" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Not" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 1 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1" # Item value + End KeyMap + End KeyMap + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/intersection-not.out b/ast_tester/fixtures/stcs/intersection-not.out new file mode 100644 index 00000000..de1a96c6 --- /dev/null +++ b/ast_tester/fixtures/stcs/intersection-not.out @@ -0,0 +1 @@ +Intersection ICRS TOPOCENTER ( Circle 10 20 2 Not ( Circle 10 20 1 ) ) diff --git a/ast_tester/fixtures/stcs/intersection-not.out-20 b/ast_tester/fixtures/stcs/intersection-not.out-20 new file mode 100644 index 00000000..b0604dc0 --- /dev/null +++ b/ast_tester/fixtures/stcs/intersection-not.out-20 @@ -0,0 +1,8 @@ +Intersection ICRS + TOPOCENTER ( + Circle 10 20 2 + Not ( + Circle 10 + 20 1 + ) + ) diff --git a/ast_tester/fixtures/stcs/intersection-not.props.native b/ast_tester/fixtures/stcs/intersection-not.props.native new file mode 100644 index 00000000..00fb586a --- /dev/null +++ b/ast_tester/fixtures/stcs/intersection-not.props.native @@ -0,0 +1,79 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "FRAME" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "ICRS" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "Intersection" # Item value + Key3 = "NREG" # Item name + Typ3 = 1 # Item data type (int) + Val3 = 2 # Item value + Key4 = "REGION1" # Item name + Typ4 = 4 # Item data type (AST Object) + Val4 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "2" # Item value + End KeyMap + Key5 = "REGION2" # Item name + Typ5 = 4 # Item data type (AST Object) + Val5 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Not" # Item value + Key2 = "NREG" # Item name + Typ2 = 1 # Item data type (int) + Val2 = 1 # Item value + Key3 = "REGION1" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Circle" # Item value + Key4 = "RADIUS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1" # Item value + End KeyMap + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/intersection-not.stcs b/ast_tester/fixtures/stcs/intersection-not.stcs new file mode 100644 index 00000000..6266b803 --- /dev/null +++ b/ast_tester/fixtures/stcs/intersection-not.stcs @@ -0,0 +1 @@ +Intersection ICRS ( Circle 10 20 2 Not ( Circle 10 20 1 ) ) diff --git a/ast_tester/fixtures/stcs/intersection-not.warnings b/ast_tester/fixtures/stcs/intersection-not.warnings new file mode 100644 index 00000000..29457709 --- /dev/null +++ b/ast_tester/fixtures/stcs/intersection-not.warnings @@ -0,0 +1 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. diff --git a/ast_tester/fixtures/stcs/intersection-one-region.error b/ast_tester/fixtures/stcs/intersection-one-region.error new file mode 100644 index 00000000..f80c6dc0 --- /dev/null +++ b/ast_tester/fixtures/stcs/intersection-one-region.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): Less than two CoordinateAreas found within an 'Intersection' element in an STC-S description: 'Intersection ICRS ( Circle 10 20 1 )'. diff --git a/ast_tester/fixtures/stcs/intersection-one-region.stcs b/ast_tester/fixtures/stcs/intersection-one-region.stcs new file mode 100644 index 00000000..3ae0c3d5 --- /dev/null +++ b/ast_tester/fixtures/stcs/intersection-one-region.stcs @@ -0,0 +1 @@ +Intersection ICRS ( Circle 10 20 1 ) diff --git a/ast_tester/fixtures/stcs/not-two-regions.error b/ast_tester/fixtures/stcs/not-two-regions.error new file mode 100644 index 00000000..bd45b11f --- /dev/null +++ b/ast_tester/fixtures/stcs/not-two-regions.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): 2 CoordinateAreas found within a 'Not' element in an STC-S description: '( Circle 10 20 1 Circle 11 20 1 )'. diff --git a/ast_tester/fixtures/stcs/not-two-regions.stcs b/ast_tester/fixtures/stcs/not-two-regions.stcs new file mode 100644 index 00000000..63e538e0 --- /dev/null +++ b/ast_tester/fixtures/stcs/not-two-regions.stcs @@ -0,0 +1 @@ +Not ICRS ( Circle 10 20 1 Circle 11 20 1 ) diff --git a/ast_tester/fixtures/stcs/polygon-odd-vertex.error b/ast_tester/fixtures/stcs/polygon-odd-vertex.error new file mode 100644 index 00000000..dcdb3982 --- /dev/null +++ b/ast_tester/fixtures/stcs/polygon-odd-vertex.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): Expected another vertex value for a Polygon, but found '' in an STC-S description: 'Polygon ICRS 10 20 11 21 10'. diff --git a/ast_tester/fixtures/stcs/polygon-odd-vertex.stcs b/ast_tester/fixtures/stcs/polygon-odd-vertex.stcs new file mode 100644 index 00000000..6c32e0d0 --- /dev/null +++ b/ast_tester/fixtures/stcs/polygon-odd-vertex.stcs @@ -0,0 +1 @@ +Polygon ICRS 10 20 11 21 10 diff --git a/ast_tester/fixtures/stcs/redshift-error-range.native b/ast_tester/fixtures/stcs/redshift-error-range.native new file mode 100644 index 00000000..ed42ae29 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-error-range.native @@ -0,0 +1,96 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "COORDS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin PointList # Collection of points +# Title = "Wavelength (Topocentric)" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Wavelength" # Label for axis 1 +# System = "WAVE" # Coordinate system type +# Uni1 = "km/s" # Units for axis 1 + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SpecFrame # Description of spectral coordinate system +# Title = "Wavelength (Topocentric)" # Title of coordinate system + Naxes = 1 # Number of coordinate axes + Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Wavelength" # Label for axis 1 +# System = "WAVE" # Coordinate system type +# Uni1 = "km/s" # Units for axis 1 + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "km/s" # Axis units + End Axis + IsA Frame # Coordinate system description + SoR = "Topocentric" # Standard of rest + UWave = "km/s" # Preferred units for wavelength + End SpecFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 300 # Coordinate values... + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "Wavelength (Topocentric)" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Wavelength" # Label for axis 1 +# System = "WAVE" # Coordinate system type +# Uni1 = "km/s" # Units for axis 1 + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 300 # Coordinate values... + X2 = 301.5 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End PointList + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 1 # Item values + V1_2 = 2 + Key2 = "ERROR" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "1 2" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Redshift" # Item value + Key4 = "REDSHIFT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "300" # Item value + Key5 = "REFPOS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "TOPOCENTER" # Item value + Key6 = "TYPE" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "VELOCITY" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/redshift-error-range.out b/ast_tester/fixtures/stcs/redshift-error-range.out new file mode 100644 index 00000000..cb0444e7 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-error-range.out @@ -0,0 +1 @@ +Redshift TOPOCENTER OPTICAL 300 Error 2 diff --git a/ast_tester/fixtures/stcs/redshift-error-range.out-20 b/ast_tester/fixtures/stcs/redshift-error-range.out-20 new file mode 100644 index 00000000..74b1200c --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-error-range.out-20 @@ -0,0 +1,3 @@ +Redshift TOPOCENTER + OPTICAL 300 + Error 2 diff --git a/ast_tester/fixtures/stcs/redshift-error-range.props.native b/ast_tester/fixtures/stcs/redshift-error-range.props.native new file mode 100644 index 00000000..638b95ec --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-error-range.props.native @@ -0,0 +1,31 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 1 # Item values + V1_2 = 2 + Key2 = "ERROR" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "1 2" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Redshift" # Item value + Key4 = "REDSHIFT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "300" # Item value + Key5 = "REFPOS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "TOPOCENTER" # Item value + Key6 = "TYPE" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "VELOCITY" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/redshift-error-range.stcs b/ast_tester/fixtures/stcs/redshift-error-range.stcs new file mode 100644 index 00000000..e3a3ddf7 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-error-range.stcs @@ -0,0 +1 @@ +Redshift TOPOCENTER VELOCITY 300 Error 1 2 diff --git a/ast_tester/fixtures/stcs/redshift-error-range.warnings b/ast_tester/fixtures/stcs/redshift-error-range.warnings new file mode 100644 index 00000000..f7bb15c1 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-error-range.warnings @@ -0,0 +1 @@ +An STC-S redshift sub-phrase contains an Error range. AST does not support error ranges so the mid value will be used as the error. diff --git a/ast_tester/fixtures/stcs/redshift-radio.native b/ast_tester/fixtures/stcs/redshift-radio.native new file mode 100644 index 00000000..51f89887 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-radio.native @@ -0,0 +1,72 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Box # Axis intervals +# Title = "Redshift (Topocentric), rest frequency = 100000 GHz" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Redshift" # Label for axis 1 +# System = "ZOPT" # Coordinate system type + IsA Frame # Coordinate system description + Closed = 1 # Boundary is inside + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SpecFrame # Description of spectral coordinate system +# Title = "Redshift (Topocentric), rest frequency = 100000 GHz" # Title of coordinate system + Naxes = 1 # Number of coordinate axes + Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Redshift" # Label for axis 1 + System = "ZOPT" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + SoR = "Topocentric" # Standard of rest + End SpecFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.15000000000000002 # Coordinate values... + X2 = 0.20000000000000001 + End PointSet + IsA Region # An area within a coordinate system + End Box + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DOPPLERDEF" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "RADIO" # Item value + Key2 = "HILIMIT" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "0.2" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "RedshiftInterval" # Item value + Key4 = "LOLIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "0.1" # Item value + Key5 = "REFPOS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "TOPOCENTER" # Item value + Key6 = "TYPE" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "REDSHIFT" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/redshift-radio.out b/ast_tester/fixtures/stcs/redshift-radio.out new file mode 100644 index 00000000..c9905707 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-radio.out @@ -0,0 +1 @@ +RedshiftInterval TOPOCENTER OPTICAL 0.1 0.2 diff --git a/ast_tester/fixtures/stcs/redshift-radio.out-20 b/ast_tester/fixtures/stcs/redshift-radio.out-20 new file mode 100644 index 00000000..16684e24 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-radio.out-20 @@ -0,0 +1,3 @@ +RedshiftInterval + TOPOCENTER + OPTICAL 0.1 0.2 diff --git a/ast_tester/fixtures/stcs/redshift-radio.props.native b/ast_tester/fixtures/stcs/redshift-radio.props.native new file mode 100644 index 00000000..6ceb7f7a --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-radio.props.native @@ -0,0 +1,29 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "DOPPLERDEF" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "RADIO" # Item value + Key2 = "HILIMIT" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "0.2" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "RedshiftInterval" # Item value + Key4 = "LOLIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "0.1" # Item value + Key5 = "REFPOS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "TOPOCENTER" # Item value + Key6 = "TYPE" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "REDSHIFT" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/redshift-radio.stcs b/ast_tester/fixtures/stcs/redshift-radio.stcs new file mode 100644 index 00000000..eba43f29 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-radio.stcs @@ -0,0 +1 @@ +RedshiftInterval TOPOCENTER REDSHIFT RADIO 0.1 0.2 diff --git a/ast_tester/fixtures/stcs/redshift-radio.warnings b/ast_tester/fixtures/stcs/redshift-radio.warnings new file mode 100644 index 00000000..f9cfbd82 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-radio.warnings @@ -0,0 +1 @@ +STC-S RADIO redshift not supported. Assuming OPTICAL redshift instead. diff --git a/ast_tester/fixtures/stcs/redshift-relativistic.native b/ast_tester/fixtures/stcs/redshift-relativistic.native new file mode 100644 index 00000000..d9b8da6c --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-relativistic.native @@ -0,0 +1,148 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Box # Axis intervals +# Title = "Redshift, rest frequency = 100000 GHz" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Redshift" # Label for axis 1 +# System = "ZOPT" # Coordinate system type + IsA Frame # Coordinate system description + Closed = 1 # Boundary is inside + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SpecFrame # Description of spectral coordinate system +# Title = "Redshift, rest frequency = 100000 GHz" # Title of coordinate system + Naxes = 1 # Number of coordinate axes + Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Redshift" # Label for axis 1 + System = "ZOPT" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description +# SoR = "Heliocentric" # Standard of rest + End SpecFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.15000000000000002 # Coordinate values... + X2 = 0.20000000000000001 + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "Redshift, rest frequency = 100000 GHz" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Redshift" # Label for axis 1 +# System = "ZOPT" # Coordinate system type + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.15000000000000002 # Coordinate values... + X2 = 0.16000000000000003 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End Box + Key2 = "COORDS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin PointList # Collection of points +# Title = "Redshift, rest frequency = 100000 GHz" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Redshift" # Label for axis 1 +# System = "ZOPT" # Coordinate system type + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SpecFrame # Description of spectral coordinate system +# Title = "Redshift, rest frequency = 100000 GHz" # Title of coordinate system + Naxes = 1 # Number of coordinate axes + Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Redshift" # Label for axis 1 + System = "ZOPT" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description +# SoR = "Heliocentric" # Standard of rest + End SpecFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.14999999999999999 # Coordinate values... + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "Redshift, rest frequency = 100000 GHz" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Redshift" # Label for axis 1 +# System = "ZOPT" # Coordinate system type + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.14999999999999999 # Coordinate values... + X2 = 0.16 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End PointList + Key3 = "PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 0.01 # Item values + Key2 = "DOPPLERDEF" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "RELATIVISTIC" # Item value + Key3 = "ERROR" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "0.01" # Item value + Key4 = "HILIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "0.2" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "RedshiftInterval" # Item value + Key6 = "LOLIMIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "0.1" # Item value + Key7 = "REDSHIFT" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "0.15" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/redshift-relativistic.out b/ast_tester/fixtures/stcs/redshift-relativistic.out new file mode 100644 index 00000000..829bca36 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-relativistic.out @@ -0,0 +1 @@ +RedshiftInterval HELIOCENTER OPTICAL 0.1 0.2 Redshift 0.15 Error 0.01 diff --git a/ast_tester/fixtures/stcs/redshift-relativistic.out-20 b/ast_tester/fixtures/stcs/redshift-relativistic.out-20 new file mode 100644 index 00000000..5d9c52bc --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-relativistic.out-20 @@ -0,0 +1,5 @@ +RedshiftInterval + HELIOCENTER + OPTICAL 0.1 0.2 + Redshift 0.15 + Error 0.01 diff --git a/ast_tester/fixtures/stcs/redshift-relativistic.props.native b/ast_tester/fixtures/stcs/redshift-relativistic.props.native new file mode 100644 index 00000000..55fc53bc --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-relativistic.props.native @@ -0,0 +1,33 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 0.01 # Item values + Key2 = "DOPPLERDEF" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "RELATIVISTIC" # Item value + Key3 = "ERROR" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "0.01" # Item value + Key4 = "HILIMIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "0.2" # Item value + Key5 = "ID" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "RedshiftInterval" # Item value + Key6 = "LOLIMIT" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "0.1" # Item value + Key7 = "REDSHIFT" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "0.15" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/redshift-relativistic.stcs b/ast_tester/fixtures/stcs/redshift-relativistic.stcs new file mode 100644 index 00000000..682b84d1 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-relativistic.stcs @@ -0,0 +1 @@ +RedshiftInterval RELATIVISTIC 0.1 0.2 Redshift 0.15 Error 0.01 diff --git a/ast_tester/fixtures/stcs/redshift-relativistic.warnings b/ast_tester/fixtures/stcs/redshift-relativistic.warnings new file mode 100644 index 00000000..40743b40 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-relativistic.warnings @@ -0,0 +1,2 @@ +Redshift reference position defaulting to 'HELIOCENTER' in an STC-S description. +STC-S RELATIVISTIC redshift not supported. Assuming OPTICAL redshift instead. diff --git a/ast_tester/fixtures/stcs/redshift-unit-hz.native b/ast_tester/fixtures/stcs/redshift-unit-hz.native new file mode 100644 index 00000000..df632c90 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-unit-hz.native @@ -0,0 +1,96 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "COORDS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin PointList # Collection of points +# Title = "Redshift (Topocentric), rest frequency = 100000 GHz" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Redshift" # Label for axis 1 +# System = "ZOPT" # Coordinate system type + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SpecFrame # Description of spectral coordinate system +# Title = "Redshift (Topocentric), rest frequency = 100000 GHz" # Title of coordinate system + Naxes = 1 # Number of coordinate axes + Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Redshift" # Label for axis 1 + System = "ZOPT" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + SoR = "Topocentric" # Standard of rest + End SpecFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.5 # Coordinate values... + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "Redshift (Topocentric), rest frequency = 100000 GHz" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "REDSHIFT" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Redshift" # Label for axis 1 +# System = "ZOPT" # Coordinate system type + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.5 # Coordinate values... + X2 = 0.51000000000000001 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End PointList + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 16 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 0.01 # Item values + Key2 = "DOPPLERDEF" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "OPTICAL" # Item value + Key3 = "ERROR" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "0.01" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Redshift" # Item value + Key5 = "REDSHIFT" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "0.5" # Item value + Key6 = "REFPOS" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "TOPOCENTER" # Item value + Key7 = "TYPE" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "REDSHIFT" # Item value + Key8 = "UNIT" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "Hz" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/redshift-unit-hz.out b/ast_tester/fixtures/stcs/redshift-unit-hz.out new file mode 100644 index 00000000..cda22d4b --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-unit-hz.out @@ -0,0 +1 @@ +Redshift TOPOCENTER OPTICAL 0.5 Error 0.01 diff --git a/ast_tester/fixtures/stcs/redshift-unit-hz.out-20 b/ast_tester/fixtures/stcs/redshift-unit-hz.out-20 new file mode 100644 index 00000000..f7adccad --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-unit-hz.out-20 @@ -0,0 +1,3 @@ +Redshift TOPOCENTER + OPTICAL 0.5 + Error 0.01 diff --git a/ast_tester/fixtures/stcs/redshift-unit-hz.props.native b/ast_tester/fixtures/stcs/redshift-unit-hz.props.native new file mode 100644 index 00000000..9fea6dbd --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-unit-hz.props.native @@ -0,0 +1,36 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "REDSHIFT_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 16 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 1 # Vector length + V1_1 = 0.01 # Item values + Key2 = "DOPPLERDEF" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "OPTICAL" # Item value + Key3 = "ERROR" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "0.01" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Redshift" # Item value + Key5 = "REDSHIFT" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "0.5" # Item value + Key6 = "REFPOS" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "TOPOCENTER" # Item value + Key7 = "TYPE" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "REDSHIFT" # Item value + Key8 = "UNIT" # Item name + Typ8 = 3 # Item data type (string) + Val8 = "Hz" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/redshift-unit-hz.stcs b/ast_tester/fixtures/stcs/redshift-unit-hz.stcs new file mode 100644 index 00000000..fdccc0b3 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-unit-hz.stcs @@ -0,0 +1 @@ +Redshift TOPOCENTER REDSHIFT OPTICAL 0.5 unit Hz Error 0.01 diff --git a/ast_tester/fixtures/stcs/redshift-unit-hz.warnings b/ast_tester/fixtures/stcs/redshift-unit-hz.warnings new file mode 100644 index 00000000..15065707 --- /dev/null +++ b/ast_tester/fixtures/stcs/redshift-unit-hz.warnings @@ -0,0 +1 @@ +Ignoring units (Hz) specified for REDSHIFT in an STC-S description. diff --git a/ast_tester/fixtures/stcs/spectral-error-range.native b/ast_tester/fixtures/stcs/spectral-error-range.native new file mode 100644 index 00000000..734fdc98 --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-error-range.native @@ -0,0 +1,93 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "COORDS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin PointList # Collection of points +# Title = "Wavelength" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Wavelength" # Label for axis 1 +# System = "WAVE" # Coordinate system type +# Uni1 = "nm" # Units for axis 1 + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SpecFrame # Description of spectral coordinate system +# Title = "Wavelength" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Wavelength" # Label for axis 1 + System = "WAVE" # Coordinate system type +# Uni1 = "nm" # Units for axis 1 + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "nm" # Axis units + End Axis + IsA Frame # Coordinate system description +# SoR = "Heliocentric" # Standard of rest + UWave = "nm" # Preferred units for wavelength + End SpecFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 4 # Coordinate values... + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "Wavelength" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Wavelength" # Label for axis 1 +# System = "WAVE" # Coordinate system type +# Uni1 = "nm" # Units for axis 1 + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 4 # Coordinate values... + X2 = 5.5 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End PointList + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPECTRAL_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 1 # Item values + V1_2 = 2 + Key2 = "ERROR" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "1 2" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Spectral" # Item value + Key4 = "SPECTRAL" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "4" # Item value + Key5 = "UNIT" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "nm" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/spectral-error-range.out b/ast_tester/fixtures/stcs/spectral-error-range.out new file mode 100644 index 00000000..6f7f100d --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-error-range.out @@ -0,0 +1 @@ +Spectral HELIOCENTER 4 unit nm Error 2 diff --git a/ast_tester/fixtures/stcs/spectral-error-range.out-20 b/ast_tester/fixtures/stcs/spectral-error-range.out-20 new file mode 100644 index 00000000..0c1104c7 --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-error-range.out-20 @@ -0,0 +1,2 @@ +Spectral HELIOCENTER + 4 unit nm Error 2 diff --git a/ast_tester/fixtures/stcs/spectral-error-range.props.native b/ast_tester/fixtures/stcs/spectral-error-range.props.native new file mode 100644 index 00000000..b9ff6584 --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-error-range.props.native @@ -0,0 +1,28 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPECTRAL_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 1 # Item values + V1_2 = 2 + Key2 = "ERROR" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "1 2" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Spectral" # Item value + Key4 = "SPECTRAL" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "4" # Item value + Key5 = "UNIT" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "nm" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/spectral-error-range.stcs b/ast_tester/fixtures/stcs/spectral-error-range.stcs new file mode 100644 index 00000000..f9958ed4 --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-error-range.stcs @@ -0,0 +1 @@ +Spectral 4 unit nm Error 1 2 diff --git a/ast_tester/fixtures/stcs/spectral-error-range.warnings b/ast_tester/fixtures/stcs/spectral-error-range.warnings new file mode 100644 index 00000000..df177bc4 --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-error-range.warnings @@ -0,0 +1,2 @@ +Spectral reference position defaulting to 'HELIOCENTER' in an STC-S description. +An STC-S spectral sub-phrase contains an Error range. AST does not support error ranges so the mid value will be used as the error. diff --git a/ast_tester/fixtures/stcs/spectral-moon.native b/ast_tester/fixtures/stcs/spectral-moon.native new file mode 100644 index 00000000..478988bf --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-moon.native @@ -0,0 +1,68 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "COORDS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin PointList # Collection of points +# Title = "Wavelength" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Wavelength" # Label for axis 1 +# System = "WAVE" # Coordinate system type +# Uni1 = "nm" # Units for axis 1 + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SpecFrame # Description of spectral coordinate system +# Title = "Wavelength" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Wavelength" # Label for axis 1 + System = "WAVE" # Coordinate system type +# Uni1 = "nm" # Units for axis 1 + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "nm" # Axis units + End Axis + IsA Frame # Coordinate system description +# SoR = "Heliocentric" # Standard of rest + UWave = "nm" # Preferred units for wavelength + End SpecFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 4 # Coordinate values... + End PointSet + IsA Region # An area within a coordinate system + End PointList + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPECTRAL_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Spectral" # Item value + Key2 = "REFPOS" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "MOON" # Item value + Key3 = "SPECTRAL" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "4" # Item value + Key4 = "UNIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "nm" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/spectral-moon.out b/ast_tester/fixtures/stcs/spectral-moon.out new file mode 100644 index 00000000..cfab6b24 --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-moon.out @@ -0,0 +1 @@ +Spectral HELIOCENTER 4 unit nm diff --git a/ast_tester/fixtures/stcs/spectral-moon.out-20 b/ast_tester/fixtures/stcs/spectral-moon.out-20 new file mode 100644 index 00000000..102b8f66 --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-moon.out-20 @@ -0,0 +1,2 @@ +Spectral HELIOCENTER + 4 unit nm diff --git a/ast_tester/fixtures/stcs/spectral-moon.props.native b/ast_tester/fixtures/stcs/spectral-moon.props.native new file mode 100644 index 00000000..c8a05465 --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-moon.props.native @@ -0,0 +1,23 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "SPECTRAL_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 8 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Spectral" # Item value + Key2 = "REFPOS" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "MOON" # Item value + Key3 = "SPECTRAL" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "4" # Item value + Key4 = "UNIT" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "nm" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/spectral-moon.stcs b/ast_tester/fixtures/stcs/spectral-moon.stcs new file mode 100644 index 00000000..a10fbb3f --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-moon.stcs @@ -0,0 +1 @@ +Spectral MOON 4 unit nm diff --git a/ast_tester/fixtures/stcs/spectral-moon.warnings b/ast_tester/fixtures/stcs/spectral-moon.warnings new file mode 100644 index 00000000..129fd9f6 --- /dev/null +++ b/ast_tester/fixtures/stcs/spectral-moon.warnings @@ -0,0 +1 @@ +Using 'HELIOCENTER' in place of unsupported spectral reference position 'MOON' found in an STC-S description. diff --git a/ast_tester/fixtures/stcs/teb-timescale.moc b/ast_tester/fixtures/stcs/teb-timescale.moc new file mode 100644 index 00000000..20e63248 --- /dev/null +++ b/ast_tester/fixtures/stcs/teb-timescale.moc @@ -0,0 +1,4 @@ +6/19861 19863 +7/79443 79449 79451 79476-79477 79618 79624 79626 +8/317767 317771 317793 317795 317801 317892-317893 318466 318478 318500 318502 + 318508 318510 318592-318594 diff --git a/ast_tester/fixtures/stcs/teb-timescale.native b/ast_tester/fixtures/stcs/teb-timescale.native new file mode 100644 index 00000000..df821eb1 --- /dev/null +++ b/ast_tester/fixtures/stcs/teb-timescale.native @@ -0,0 +1,277 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Prism # Region extrusion into higher dimensions +# Title = "4-d compound coordinate system" # Title of coordinate system +# Naxes = 4 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM" # Coordinate system domain +# Epoch = 1995.9986310746065 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Frequency" # Label for axis 4 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "Hz" # Units for axis 4 (Hertz) +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin CmpFrame # Compound coordinate system description +# Title = "4-d compound coordinate system" # Title of coordinate system +# Naxes = 4 # Number of coordinate axes +# Domain = "TIME-SKY-SPECTRUM" # Coordinate system domain +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# Lbl4 = "Frequency" # Label for axis 4 +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Uni4 = "Hz" # Units for axis 4 (Hertz) +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + FrameA = # First component Frame + Begin CmpFrame # Compound coordinate system description + FrameA = # First component Frame + Begin TimeFrame # Description of time coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746065 # Julian epoch of observation + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TDB" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + FrameB = # Second component Frame + Begin SkyFrame # Description of celestial coordinate system + Naxes = 2 # Number of coordinate axes + Epoch = 1995.9986310746065 # Julian epoch of observation + System = "ICRS" # Coordinate system type + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description + End SkyFrame + End CmpFrame + FrameB = # Second component Frame + Begin SpecFrame # Description of spectral coordinate system + Naxes = 1 # Number of coordinate axes + Epoch = 1995.9986310746065 # Julian epoch of observation + System = "FREQ" # Coordinate system type + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + Unit = "Hz" # Axis units (Hertz) + End Axis + IsA Frame # Coordinate system description + UFreq = "Hz" # Preferred units for frequency + End SpecFrame + End CmpFrame + RegAxes = 4 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin Prism # Region extrusion into higher dimensions +# Title = "3-d compound coordinate system" # Title of coordinate system +# Naxes = 3 # Number of coordinate axes +# Domain = "TIME-SKY" # Coordinate system domain +# Epoch = 1995.9986310746065 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# Lbl2 = "Right ascension" # Label for axis 2 +# Lbl3 = "Declination" # Label for axis 3 +# System = "Compound" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) +# Uni2 = "hh:mm:ss.s" # Units for axis 2 +# Uni3 = "ddd:mm:ss" # Units for axis 3 +# Dir2 = 0 # Plot axis 2 in reverse direction + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + RegAxes = 3 # Number of axes spanned by the Region + IsA Region # An area within a coordinate system + RegionA = # First component Region + Begin Box # Axis intervals +# Title = "Modified Julian Date [TDB] offset from 1996-01-01 00:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1995.9986310746065 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Closed = 1 # Boundary is inside + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin TimeFrame # Description of time coordinate system +# Title = "Modified Julian Date [TDB] offset from 1996-01-01 00:00:00" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain + Epoch = 1995.9986310746065 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1996-01-01 " # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TDB" # Time scale + TmOrg = 50083 # Time offset + End TimeFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.010416666667879326 # Coordinate values... + X2 = 0.020833333335758653 + End PointSet + IsA Region # An area within a coordinate system + End Box + RegionB = # Second component Region + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 1995.9986310746065 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain + Epoch = 1995.9986310746065 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.19310635074456914 + X4 = 0.34906250706369762 + End PointSet + IsA Region # An area within a coordinate system + End Circle + End Prism + RegionB = # Second component Region + Begin PointList # Collection of points +# Title = "Frequency" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "SPECTRUM" # Coordinate system domain +# Epoch = 1995.9986310746065 # Julian epoch of observation +# Lbl1 = "Frequency" # Label for axis 1 +# System = "FREQ" # Coordinate system type +# Uni1 = "Hz" # Units for axis 1 (Hertz) + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 4 # Coordinate values... + End PointSet + IsA Region # An area within a coordinate system + End PointList + End Prism + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Circle" # Item value + Key5 = "RADIUS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1" # Item value + End KeyMap + Key2 = "SPECTRAL_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Spectral" # Item value + Key2 = "SPECTRAL" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "4" # Item value + End KeyMap + Key3 = "TIME_PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "TimeInterval" # Item value + Key2 = "MJDSTART" # Item name + Typ2 = 2 # Item data type (double) + Val2 = 50083 # Item value + Key3 = "MJDSTOP" # Item name + Typ3 = 2 # Item data type (double) + Val3 = 50083.020833333336 # Item value + Key4 = "START" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1996-01-01T00:00:00" # Item value + Key5 = "STOP" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1996-01-01T00:30:00" # Item value + Key6 = "TIMESCALE" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "TEB" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/teb-timescale.out b/ast_tester/fixtures/stcs/teb-timescale.out new file mode 100644 index 00000000..d75491db --- /dev/null +++ b/ast_tester/fixtures/stcs/teb-timescale.out @@ -0,0 +1 @@ +TimeInterval TDB TOPOCENTER 1996-01-01T00:00:00 1996-01-01T00:30:00 Circle ICRS TOPOCENTER 10 20 1 Spectral HELIOCENTER 4 diff --git a/ast_tester/fixtures/stcs/teb-timescale.out-20 b/ast_tester/fixtures/stcs/teb-timescale.out-20 new file mode 100644 index 00000000..289f8406 --- /dev/null +++ b/ast_tester/fixtures/stcs/teb-timescale.out-20 @@ -0,0 +1,9 @@ +TimeInterval TDB + TOPOCENTER + 1996-01-01T00:00:00 + 1996-01-01T00:30:00 +Circle ICRS + TOPOCENTER 10 20 + 1 +Spectral HELIOCENTER + 4 diff --git a/ast_tester/fixtures/stcs/teb-timescale.props.native b/ast_tester/fixtures/stcs/teb-timescale.props.native new file mode 100644 index 00000000..8b65cfe5 --- /dev/null +++ b/ast_tester/fixtures/stcs/teb-timescale.props.native @@ -0,0 +1,67 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Circle" # Item value + Key5 = "RADIUS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1" # Item value + End KeyMap + Key2 = "SPECTRAL_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "Spectral" # Item value + Key2 = "SPECTRAL" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "4" # Item value + End KeyMap + Key3 = "TIME_PROPS" # Item name + Typ3 = 4 # Item data type (AST Object) + Val3 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 12 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "TimeInterval" # Item value + Key2 = "MJDSTART" # Item name + Typ2 = 2 # Item data type (double) + Val2 = 50083 # Item value + Key3 = "MJDSTOP" # Item name + Typ3 = 2 # Item data type (double) + Val3 = 50083.020833333336 # Item value + Key4 = "START" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "1996-01-01T00:00:00" # Item value + Key5 = "STOP" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1996-01-01T00:30:00" # Item value + Key6 = "TIMESCALE" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "TEB" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/teb-timescale.stcs b/ast_tester/fixtures/stcs/teb-timescale.stcs new file mode 100644 index 00000000..ede1a46a --- /dev/null +++ b/ast_tester/fixtures/stcs/teb-timescale.stcs @@ -0,0 +1 @@ +TimeInterval TEB 1996-01-01T00:00:00 1996-01-01T00:30:00 Circle ICRS 10 20 1 Spectral 4 diff --git a/ast_tester/fixtures/stcs/teb-timescale.warnings b/ast_tester/fixtures/stcs/teb-timescale.warnings new file mode 100644 index 00000000..368b02d8 --- /dev/null +++ b/ast_tester/fixtures/stcs/teb-timescale.warnings @@ -0,0 +1,4 @@ +AST does not support the 'TEB' time scale. The 'TDB' timescale is being used instead. +AST only supports topocentric time frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. +Spectral reference position defaulting to 'HELIOCENTER' in an STC-S description. diff --git a/ast_tester/fixtures/stcs/time-error-range.native b/ast_tester/fixtures/stcs/time-error-range.native new file mode 100644 index 00000000..3f95384e --- /dev/null +++ b/ast_tester/fixtures/stcs/time-error-range.native @@ -0,0 +1,98 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "COORDS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin PointList # Collection of points +# Title = "Modified Julian Date [TT] offset from 1995-10-10 12:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1995.7727583847322 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1995-10-10 12:00:00" # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin TimeFrame # Description of time coordinate system +# Title = "Modified Julian Date [TT] offset from 1995-10-10 12:00:00" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain + Epoch = 1995.7727583847322 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1995-10-10 12:00:00" # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 50000.5 # Time offset + End TimeFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 1 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0 # Coordinate values... + End PointSet + Unc = # Region defining positional uncertainties. + Begin Box # Axis intervals +# Title = "Modified Julian Date [TT] offset from 1995-10-10 12:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1995.7727583847322 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1995-10-10 12:00:00" # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0 # Coordinate values... + X2 = 1.7361111111111112e-06 + End PointSet + IsA Region # An area within a coordinate system + End Box + IsA Region # An area within a coordinate system + End PointList + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "TIME_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 0.10000000000000001 # Item values + V1_2 = 0.20000000000000001 + Key2 = "ERROR" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "0.1 0.2" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Time" # Item value + Key4 = "MJDTIME" # Item name + Typ4 = 2 # Item data type (double) + Val4 = 50000.5 # Item value + Key5 = "REFPOS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "TOPOCENTER" # Item value + Key6 = "TIME" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "MJD 50000.5" # Item value + Key7 = "TIMESCALE" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "TT" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/time-error-range.out b/ast_tester/fixtures/stcs/time-error-range.out new file mode 100644 index 00000000..bbf51dec --- /dev/null +++ b/ast_tester/fixtures/stcs/time-error-range.out @@ -0,0 +1 @@ +Time TT TOPOCENTER MJD 50000.5 Error 0.1 diff --git a/ast_tester/fixtures/stcs/time-error-range.out-20 b/ast_tester/fixtures/stcs/time-error-range.out-20 new file mode 100644 index 00000000..40855249 --- /dev/null +++ b/ast_tester/fixtures/stcs/time-error-range.out-20 @@ -0,0 +1,3 @@ +Time TT TOPOCENTER + MJD 50000.5 + Error 0.1 diff --git a/ast_tester/fixtures/stcs/time-error-range.props.native b/ast_tester/fixtures/stcs/time-error-range.props.native new file mode 100644 index 00000000..cb98b989 --- /dev/null +++ b/ast_tester/fixtures/stcs/time-error-range.props.native @@ -0,0 +1,34 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "TIME_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "DERROR" # Item name + Typ1 = 2 # Item data type (double) + Nel1 = 2 # Vector length + V1_1 = 0.10000000000000001 # Item values + V1_2 = 0.20000000000000001 + Key2 = "ERROR" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "0.1 0.2" # Item value + Key3 = "ID" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "Time" # Item value + Key4 = "MJDTIME" # Item name + Typ4 = 2 # Item data type (double) + Val4 = 50000.5 # Item value + Key5 = "REFPOS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "TOPOCENTER" # Item value + Key6 = "TIME" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "MJD 50000.5" # Item value + Key7 = "TIMESCALE" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "TT" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/time-error-range.stcs b/ast_tester/fixtures/stcs/time-error-range.stcs new file mode 100644 index 00000000..f9682fea --- /dev/null +++ b/ast_tester/fixtures/stcs/time-error-range.stcs @@ -0,0 +1 @@ +Time TT TOPOCENTER MJD 50000.5 Error 0.1 0.2 diff --git a/ast_tester/fixtures/stcs/time-error-range.warnings b/ast_tester/fixtures/stcs/time-error-range.warnings new file mode 100644 index 00000000..4da95dc9 --- /dev/null +++ b/ast_tester/fixtures/stcs/time-error-range.warnings @@ -0,0 +1 @@ +An STC-S time sub-phrase contains an Error range. AST does not support error ranges so the mid value will be used as the error. diff --git a/ast_tester/fixtures/stcs/time-jd.native b/ast_tester/fixtures/stcs/time-jd.native new file mode 100644 index 00000000..d65c4e2c --- /dev/null +++ b/ast_tester/fixtures/stcs/time-jd.native @@ -0,0 +1,78 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Box # Axis intervals +# Title = "Modified Julian Date [TT] offset from 1995-10-09 12:00:00" # Title of coordinate system +# Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain +# Epoch = 1995.7700205339463 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1995-10-09 12:00:00" # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + IsA Frame # Coordinate system description + Closed = 1 # Boundary is inside + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin TimeFrame # Description of time coordinate system +# Title = "Modified Julian Date [TT] offset from 1995-10-09 12:00:00" # Title of coordinate system + Naxes = 1 # Number of coordinate axes +# Domain = "TIME" # Coordinate system domain + Epoch = 1995.7700205339463 # Julian epoch of observation +# Lbl1 = "Modified Julian Date offset from 1995-10-09 12:00:00" # Label for axis 1 +# System = "MJD" # Coordinate system type +# Uni1 = "d" # Units for axis 1 (day) + Ax1 = # Axis number 1 + Begin Axis # Coordinate axis + End Axis + IsA Frame # Coordinate system description + TmScl = "TT" # Time scale + TmOrg = 49999.5 # Time offset + End TimeFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 1 # Number of coordinates per point + X1 = 0.625 # Coordinate values... + X2 = 1.25 + End PointSet + IsA Region # An area within a coordinate system + End Box + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "TIME_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "TimeInterval" # Item value + Key2 = "MJDSTART" # Item name + Typ2 = 2 # Item data type (double) + Val2 = 49999.5 # Item value + Key3 = "MJDSTOP" # Item name + Typ3 = 2 # Item data type (double) + Val3 = 50000.75 # Item value + Key4 = "REFPOS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "TOPOCENTER" # Item value + Key5 = "START" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "JD 2450000" # Item value + Key6 = "STOP" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "JD 2450001.25" # Item value + Key7 = "TIMESCALE" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "TT" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/time-jd.out b/ast_tester/fixtures/stcs/time-jd.out new file mode 100644 index 00000000..f324a3ba --- /dev/null +++ b/ast_tester/fixtures/stcs/time-jd.out @@ -0,0 +1 @@ +TimeInterval TT TOPOCENTER JD 2450000 JD 2450001.25 diff --git a/ast_tester/fixtures/stcs/time-jd.out-20 b/ast_tester/fixtures/stcs/time-jd.out-20 new file mode 100644 index 00000000..2424bd64 --- /dev/null +++ b/ast_tester/fixtures/stcs/time-jd.out-20 @@ -0,0 +1,4 @@ +TimeInterval TT + TOPOCENTER JD + 2450000 JD + 2450001.25 diff --git a/ast_tester/fixtures/stcs/time-jd.props.native b/ast_tester/fixtures/stcs/time-jd.props.native new file mode 100644 index 00000000..add7119c --- /dev/null +++ b/ast_tester/fixtures/stcs/time-jd.props.native @@ -0,0 +1,32 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 2 # Total member count + Key1 = "TIME_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 14 # Total member count + Key1 = "ID" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "TimeInterval" # Item value + Key2 = "MJDSTART" # Item name + Typ2 = 2 # Item data type (double) + Val2 = 49999.5 # Item value + Key3 = "MJDSTOP" # Item name + Typ3 = 2 # Item data type (double) + Val3 = 50000.75 # Item value + Key4 = "REFPOS" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "TOPOCENTER" # Item value + Key5 = "START" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "JD 2450000" # Item value + Key6 = "STOP" # Item name + Typ6 = 3 # Item data type (string) + Val6 = "JD 2450001.25" # Item value + Key7 = "TIMESCALE" # Item name + Typ7 = 3 # Item data type (string) + Val7 = "TT" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/time-jd.stcs b/ast_tester/fixtures/stcs/time-jd.stcs new file mode 100644 index 00000000..35e359de --- /dev/null +++ b/ast_tester/fixtures/stcs/time-jd.stcs @@ -0,0 +1 @@ +TimeInterval TT TOPOCENTER JD 2450000 JD 2450001.25 diff --git a/ast_tester/fixtures/stcs/time-jd.warnings b/ast_tester/fixtures/stcs/time-jd.warnings new file mode 100644 index 00000000..e69de29b diff --git a/ast_tester/fixtures/stcs/timeinterval-unit-m.error b/ast_tester/fixtures/stcs/timeinterval-unit-m.error new file mode 100644 index 00000000..d17ba639 --- /dev/null +++ b/ast_tester/fixtures/stcs/timeinterval-unit-m.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): Unsupported units (m) for the time axis within an STC-S description. diff --git a/ast_tester/fixtures/stcs/timeinterval-unit-m.stcs b/ast_tester/fixtures/stcs/timeinterval-unit-m.stcs new file mode 100644 index 00000000..438ba5b1 --- /dev/null +++ b/ast_tester/fixtures/stcs/timeinterval-unit-m.stcs @@ -0,0 +1 @@ +TimeInterval TT MJD 50000 MJD 50001 unit m diff --git a/ast_tester/fixtures/stcs/union-no-opening.error b/ast_tester/fixtures/stcs/union-no-opening.error new file mode 100644 index 00000000..82831f13 --- /dev/null +++ b/ast_tester/fixtures/stcs/union-no-opening.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): Expected an opening parenthesis but found 'Circle' in an STC-S description: 'Union ICRS Circle'. diff --git a/ast_tester/fixtures/stcs/union-no-opening.stcs b/ast_tester/fixtures/stcs/union-no-opening.stcs new file mode 100644 index 00000000..e3f6f711 --- /dev/null +++ b/ast_tester/fixtures/stcs/union-no-opening.stcs @@ -0,0 +1 @@ +Union ICRS Circle 10 20 1 Circle 11 20 1 diff --git a/ast_tester/fixtures/stcs/union-not-a-region.error b/ast_tester/fixtures/stcs/union-not-a-region.error new file mode 100644 index 00000000..cf336dcb --- /dev/null +++ b/ast_tester/fixtures/stcs/union-not-a-region.error @@ -0,0 +1,2 @@ +AST__BADIN +astRead(StcsChan): Expected a CoordinateArea or a closing parenthesis but found 'fred' in an STC-S description: 'Union ICRS ( Circle 10 20 1 fred'. diff --git a/ast_tester/fixtures/stcs/union-not-a-region.stcs b/ast_tester/fixtures/stcs/union-not-a-region.stcs new file mode 100644 index 00000000..aaad7003 --- /dev/null +++ b/ast_tester/fixtures/stcs/union-not-a-region.stcs @@ -0,0 +1 @@ +Union ICRS ( Circle 10 20 1 fred ) diff --git a/ast_tester/fixtures/stcs/velocity-interval.moc b/ast_tester/fixtures/stcs/velocity-interval.moc new file mode 100644 index 00000000..20e63248 --- /dev/null +++ b/ast_tester/fixtures/stcs/velocity-interval.moc @@ -0,0 +1,4 @@ +6/19861 19863 +7/79443 79449 79451 79476-79477 79618 79624 79626 +8/317767 317771 317793 317795 317801 317892-317893 318466 318478 318500 318502 + 318508 318510 318592-318594 diff --git a/ast_tester/fixtures/stcs/velocity-interval.native b/ast_tester/fixtures/stcs/velocity-interval.native new file mode 100644 index 00000000..c6cfbfd1 --- /dev/null +++ b/ast_tester/fixtures/stcs/velocity-interval.native @@ -0,0 +1,104 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "AREA" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin Circle # Circular or spherical region +# Title = "ICRS coordinates" # Title of coordinate system +# Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 +# System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + IsA Frame # Coordinate system description + Adapt = 1 # Region adapts to coord sys changes + Frm = # Coordinate system + Begin SkyFrame # Description of celestial coordinate system +# Title = "ICRS coordinates" # Title of coordinate system + Naxes = 2 # Number of coordinate axes +# Domain = "SKY" # Coordinate system domain +# Epoch = 2000 # Julian epoch of observation +# Lbl1 = "Right ascension" # Label for axis 1 +# Lbl2 = "Declination" # Label for axis 2 + System = "ICRS" # Coordinate system type +# Uni1 = "hh:mm:ss.s" # Units for axis 1 +# Uni2 = "ddd:mm:ss" # Units for axis 2 +# Dir1 = 0 # Plot axis 1 in reverse direction +# Bot2 = -1.5707963267948966 # Lowest legal axis value +# Top2 = 1.5707963267948966 # Highest legal axis value + Ax1 = # Axis number 1 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + Ax2 = # Axis number 2 + Begin SkyAxis # Celestial coordinate axis + End SkyAxis + IsA Frame # Coordinate system description +# SkyTol = 0.001 # Smallest significant separation [arc-sec] + End SkyFrame + Points = # Points defining the shape + Begin PointSet # Container for a set of points + Npoint = 2 # Number of points + Ncoord = 2 # Number of coordinates per point + X1 = 0.17453292519943295 # Coordinate values... + X2 = 0.3490658503988659 + X3 = 0.19310635074456914 + X4 = 0.34906250706369762 + End PointSet + IsA Region # An area within a coordinate system + End Circle + Key2 = "PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Circle" # Item value + Key5 = "RADIUS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1" # Item value + End KeyMap + Key2 = "VELOCITY_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "HILIMIT" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "2" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "VelocityInterval" # Item value + Key3 = "LOLIMIT" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "1" # Item value + End KeyMap + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/velocity-interval.out b/ast_tester/fixtures/stcs/velocity-interval.out new file mode 100644 index 00000000..86c63179 --- /dev/null +++ b/ast_tester/fixtures/stcs/velocity-interval.out @@ -0,0 +1 @@ +Circle ICRS TOPOCENTER 10 20 1 diff --git a/ast_tester/fixtures/stcs/velocity-interval.out-20 b/ast_tester/fixtures/stcs/velocity-interval.out-20 new file mode 100644 index 00000000..7a2d99d0 --- /dev/null +++ b/ast_tester/fixtures/stcs/velocity-interval.out-20 @@ -0,0 +1,3 @@ +Circle ICRS + TOPOCENTER 10 20 + 1 diff --git a/ast_tester/fixtures/stcs/velocity-interval.props.native b/ast_tester/fixtures/stcs/velocity-interval.props.native new file mode 100644 index 00000000..ce08ca3e --- /dev/null +++ b/ast_tester/fixtures/stcs/velocity-interval.props.native @@ -0,0 +1,45 @@ + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 4 # Total member count + Key1 = "SPACE_PROPS" # Item name + Typ1 = 4 # Item data type (AST Object) + Val1 = # Item value + Begin KeyMap # Map of key/value pairs + KyErr = 0 # Report non-existant keys? + MapSz = 16 # Size of hash table + MemCnt = 10 # Total member count + Key1 = "CENTRE" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "10 20" # Item value + Key2 = "DCENTRE" # Item name + Typ2 = 2 # Item data type (double) + Nel2 = 2 # Vector length + V2_1 = 10 # Item values + V2_2 = 20 + Key3 = "FRAME" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "ICRS" # Item value + Key4 = "ID" # Item name + Typ4 = 3 # Item data type (string) + Val4 = "Circle" # Item value + Key5 = "RADIUS" # Item name + Typ5 = 3 # Item data type (string) + Val5 = "1" # Item value + End KeyMap + Key2 = "VELOCITY_PROPS" # Item name + Typ2 = 4 # Item data type (AST Object) + Val2 = # Item value + Begin KeyMap # Map of key/value pairs + MapSz = 16 # Size of hash table + MemCnt = 6 # Total member count + Key1 = "HILIMIT" # Item name + Typ1 = 3 # Item data type (string) + Val1 = "2" # Item value + Key2 = "ID" # Item name + Typ2 = 3 # Item data type (string) + Val2 = "VelocityInterval" # Item value + Key3 = "LOLIMIT" # Item name + Typ3 = 3 # Item data type (string) + Val3 = "1" # Item value + End KeyMap + End KeyMap diff --git a/ast_tester/fixtures/stcs/velocity-interval.stcs b/ast_tester/fixtures/stcs/velocity-interval.stcs new file mode 100644 index 00000000..3a310c29 --- /dev/null +++ b/ast_tester/fixtures/stcs/velocity-interval.stcs @@ -0,0 +1 @@ +Circle ICRS 10 20 1 VelocityInterval 1 2 Velocity 1.5 diff --git a/ast_tester/fixtures/stcs/velocity-interval.warnings b/ast_tester/fixtures/stcs/velocity-interval.warnings new file mode 100644 index 00000000..c5b7ba2d --- /dev/null +++ b/ast_tester/fixtures/stcs/velocity-interval.warnings @@ -0,0 +1,2 @@ +AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. +Ignoring a velocity sub-phrase found in an STC-S description. diff --git a/newsfragments/+stcs-corpus.build b/newsfragments/+stcs-corpus.build index a34de7ae..f3c0e367 100644 --- a/newsfragments/+stcs-corpus.build +++ b/newsfragments/+stcs-corpus.build @@ -1 +1 @@ -The test suite gains an STC-S corpus under fixtures/stcs, shared with the Rust port of AST, and a check_stcs_corpus ctest for each of its documents that reads the document through an StcsChan and compares the error, the Native dumps of the object and properties read, the warnings and the STC-S written back at several Indent and StcsLength settings with the committed expectation files. teststcschan now compares the properties KeyMap read from its third document with its fixture as dump text, and the fixture is regenerated to hold what astRead returns. +The test suite gains an STC-S corpus under fixtures/stcs, shared with the Rust port of AST, and a check_stcs_corpus ctest for each of its documents that reads the document through an StcsChan and compares the error, the Native dumps of the object and properties read, the warnings and the STC-S written back, with the warnings of writing it, at several Indent and StcsLength settings with the committed expectation files. teststcschan now compares the properties KeyMap read from its third document with its fixture as dump text, and the fixture is regenerated to hold what astRead returns. From 8ce0a8c475395f70797edf4eaddc8bcd79f9d00e Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Thu, 3 Dec 2026 16:10:33 -0800 Subject: [PATCH 6/7] docs/issues: the defects the Rust port found in StcsChan, with reproducers The report the Rust port wrote while porting StcsChan lists eighteen defects in the C library and one in the CDS moc crate, each with the programme that shows it and its output, and says which three this branch fixes. It is copied verbatim from the port's docs/reports/2026-12-02-stcschan-c-defects.md so that the two repositories carry the same text; PLAN.md points to it from the STC-S corpus section. Generated with AI Co-Authored-By: SLAC AI --- PLAN.md | 3 + docs/issues/2026-12-02-stcschan-c-defects.md | 1596 ++++++++++++++++++ 2 files changed, 1599 insertions(+) create mode 100644 docs/issues/2026-12-02-stcschan-c-defects.md diff --git a/PLAN.md b/PLAN.md index 9d2f0f28..f74b6d7b 100644 --- a/PLAN.md +++ b/PLAN.md @@ -498,6 +498,9 @@ AST, whose StcsChan is held to the same files. Documents that still crash the reader (a redshift sub-phrase ending at `unit` or at its type, and the `SPHER3` and `UNITSPHER` flavours) are not in the corpus; the Rust port records them. + +The defects the port found in the C library while porting StcsChan, each with a reproducer, are in `docs/issues/2026-12-02-stcschan-c-defects.md`. +It is a verbatim copy of the port's report, so it keeps the port's American spelling and its references to the port's tree. - `teststcschan_c` compares the PROPS KeyMap of its third document with `programs/teststcschan/stcschan-test1-doc3-props.ast` as dump text, as astEqual compares only the class of two KeyMaps; the fixture was diff --git a/docs/issues/2026-12-02-stcschan-c-defects.md b/docs/issues/2026-12-02-stcschan-c-defects.md new file mode 100644 index 00000000..4713c09d --- /dev/null +++ b/docs/issues/2026-12-02-stcschan-c-defects.md @@ -0,0 +1,1596 @@ +# Defects found porting StcsChan: the C library and one third-party crate + +Found 2026-12-02 and 2026-12-03 while designing and porting the Rust StcsChan, in Starlink/ast's `src/stcschan.c`, its test, its demonstration programs and, for one, `src/moc.c`, with one more in the CDS `moc` Rust crate the port's corpus is checked against. +Defects 1 to 3 were found in the design, at `5112313575156ef5d89c8321a1d48967f06a02c1` (`v9.6.0-31-g51123135`, 2026-11-30), and are fixed upstream by Starlink/ast PR 122 (`564746e2`, `32a08178`, `fa5833a5`), which is in the port's pin `37f52a20`. +Defects 4 to 15 were found while porting, and 16 to 18 in the final review of the port, at `37f52a20`, and their line numbers are at that commit. +Three of them are fixed on the submodule branch `u/timj/stcs-corpus`, which is waiting to go upstream (the port's PLAN.md §8 names its head); the rest are open. +Defects 1 to 3 were not reached by `ast_tester/teststcschan.c` until PR 122 added the documents that reach them, which is why they had gone unnoticed; 14 is in that test, and 15 in the demonstration programs. +Each was found by reading the source or by the corpus comparison, and then confirmed by running a C program against a cmake build of the C library on Linux x86_64: Appendix A for 1 to 3, Appendix C for 4 to 14, Appendix E for 15 and Appendix F for 16 to 18, with valgrind's reports in Appendices B, D and F. + +| | Defect | Effect | Severity | Status | +|---|---|---|---|---| +| 1 | `ReadSpaceArgs` stores the PositionInterval upper limits under the lower limits' key | Every document with a PositionInterval fails to read with AST__MPKER; AST cannot read the STC-S it writes for a Box or an Interval | Functional, round trip broken | Fixed upstream, PR 122 (`564746e2`) | +| 2 | `GetRegionProps` tests `Negated` before its AllSky branch | AllSky is read but can never be written; a negated NullRegion is refused with a warning | Functional, round trip broken | Fixed upstream, PR 122 (`32a08178`) | +| 3 | `Read` formats an error message from a `WordContext` it never initializes | A document whose spatial unit AST does not support for a spherical frame crashes `astRead` with SIGSEGV | Crash on valid input | Fixed upstream, PR 122 (`fa5833a5`) | +| 4 | `ReadProps` sets the time identifier for `Time` inside a comment | A description starting with a `Time` sub-phrase crashes `astRead` with SIGSEGV | Crash on valid input | Fixed on `u/timj/stcs-corpus` (`57d97fc0`) | +| 5 | `StoreTimeProp` formats with a clone of the Region's TimeFrame when Format is set, and clears its TimeOrigin | A time in a TimeFrame with a TimeOrigin and a Format is written as an absolute time: 1858 instead of 1995 | Wrong output | Open | +| 6 | `Write` returns 1 for an object it refuses | `astWrite` reports one object written for a SkyFrame or an empty KeyMap, though it wrote nothing | Wrong return value | Open | +| 7 | `Read` averages an Error range with an element of `vals` it never set | The uncertainty of a space sub-phrase with between `naxes` and `2*naxes` Error values depends on the stack | Undefined result | Open | +| 8 | `Dump` writes attribute names longer than the Native reader accepts | A StcsChan dump with StcsCoords or StcsProps set cannot be read back | Functional, round trip broken | Open | +| 9 | `PutRegionProps` sets and clears KeyError on the caller's own KeyMaps | Writing a properties KeyMap leaves its space sub-phrase KeyMaps with KeyError set to false | Side effect on the caller's object | Open | +| 10 | `GetFmt` goes back to the first word's format when the word asked for is the last | The last of several numbers is written in the first one's format, which can drop digits | Wrong output | Open | +| 11 | `astAddRegion` adds no cells for a Region covering the whole sky (`moc.c`) | The Moc of `AllSky`, and of a Region that simplifies to it, is empty | Wrong output | Open | +| 12 | `WriteProps` writes a Position's position a second time | `Position ICRS 10 20` is written as `Position ICRS TOPOCENTER 10 20 10 20`, which the reader rejects | Functional, round trip broken | Open | +| 13 | `GetRegionProps` describes an Interval as a PositionInterval even when its sky bounds are undefined | `AllSky` after a time sub-phrase reads to a Region that writes nothing, with two warnings | Functional, round trip broken | Open | +| 14 | `teststcschan.c` compares KeyMaps with `astEqual`, which compares their class alone | The test's PROPS check passed for any KeyMap, and its fixture no longer matched what `astRead` returns | Test that cannot fail | Fixed on `u/timj/stcs-corpus` (`f4957c34`) | +| 15 | `stcschan-demo4.c` and `stcschan-demo5.c` test the `status` pointer, not the status | The demonstration programs never display their warnings | Wrong output | Fixed on `u/timj/stcs-corpus` (`665f1823`) | +| 16 | `ReadProps` compares the NULL word at the end of the text after a redshift `unit` or type | `RedshiftInterval 1 2 unit` and `Redshift VELOCITY` crash `astRead` with SIGSEGV | Crash on malformed input | Open | +| 17 | `Read` frees the words of a units split it never made, counted by an uninitialized `nword` | `SPHER3` and `UNITSPHER` report their error and then crash `astRead` with SIGSEGV on some runs | Crash on unsupported input | Open | +| 18 | `Read` sets no System for a redshift with no Doppler definition, and `WriteRegion` defaults its type differently | `Redshift TOPOCENTER 0.5` cannot be written; with a Resolution it is written as an optical velocity of −299787 km/s | Functional, round trip broken | Open | + +The third-party defect is in its own section below ("A defect in the CDS `moc` crate"). + +## How they were found + +The Rust port is written function by function from the C source, and the design for StcsChan asked for a C-oracle corpus covering every shape and every error path of the reader and writer. +An independent review of that design against `stcschan.c` reported that three paths could not be covered because the C itself fails on them: defects 1 to 3. +Each claim was then checked against the source with the line numbers below, and reproduced with a C program linked against the reference library. +The program, its build line and its complete output are in Appendix A; valgrind's report for defect 3 is in Appendix B. + +Defects 4 to 15 were found while porting each C function, by reading it, and while capturing the corpus `crates/starlink-ast/tests/fixtures/stcs/` from the C library, when the port and C disagreed or C failed. +Defects 16 to 18 were found in the final review of the port, by reading the reader and writer again, and by the corpus documents it asked for, one for each path of the reader; the documents of these three defects are not in the corpus, as C crashes on them or cannot write them back. +Each is recorded, with what the port does about it, in an entry of `docs/issues/c-library-quirks.md`, which the section names by its heading, except defect 15, which the two examples record in their header comments. + +## Defect 1: a PositionInterval cannot be read + +### Source + +`ReadSpaceArgs` reads the lower limits of a PositionInterval, one per spatial axis, and stores them as the string property `LOLIMIT` and the numeric vector `DLOLIMIT` (`stcschan.c:4914-4915`): + +```c + astMapPut0C( props, "LOLIMIT", prop, NULL ); + astMapPut1D( props, "DLOLIMIT", naxes, vals, NULL ); +``` + +It then reads the upper limits in the same way and stores them as `HILIMIT` and, again, `DLOLIMIT` (`stcschan.c:4936-4937`): + +```c + astMapPut0C( props, "HILIMIT", prop, NULL ); + astMapPut1D( props, "DLOLIMIT", naxes, vals, NULL ); +``` + +So the lower limits are overwritten by the upper limits and no `DHILIMIT` entry is ever made. +`MakeSpaceRegion` reads both vectors with `KeyError` set so that a missing key is an error (`stcschan.c:2035, 2050-2051`): + +```c + astSetKeyError( props, 1 ); + ... + if( spaceid == POSITION_INTERVAL_ID ) { + astMapGet1D( props, "DLOLIMIT", naxes, &nval, vec1 ); + astMapGet1D( props, "DHILIMIT", naxes, &nval, vec2 ); +``` + +The second call fails with AST__MPKER, and `astRead` returns NULL. + +### Observed + +``` +== Bug 1a: read a PositionInterval (valid STC-S 1.33) + ERR (status 233934250): astMapGet1D(KeyMap): No value was found for DHILIMIT in the supplied KeyMap. + astRead -> NULL, status 233934250 (AST__MPKER) +``` + +The writer is unaffected, and `GetRegionProps` writes a Box or an Interval as a PositionInterval (`stcschan.c:1570`), so AST cannot read its own output for those classes: + +``` +== Bug 1b: write a Box as STC-S, then read AST's own output back + | PositionInterval ICRS TOPOCENTER 10 20 30 40 + astWrite -> 1, status 0 + ERR (status 233934250): astMapGet1D(KeyMap): No value was found for DHILIMIT in the supplied KeyMap. + astRead -> NULL, status 233934250 (AST__MPKER) +``` + +The error also surfaces as a KeyMap message rather than an `astRead(StcsChan)` one, so a user sees nothing that points at the document. + +### Fix + +Store the second vector under `DHILIMIT` at `stcschan.c:4937`. +The property's string form `HILIMIT` is already correct, so written documents do not change. + +### Status + +Fixed upstream by `564746e2` (Starlink/ast PR 122), as proposed. + +## Defect 2: AllSky can never be written + +### Source + +Reading `AllSky` makes a negated NullRegion (`stcschan.c:2060-2061`): + +```c + } else if( spaceid == ALLSKY_ID ) { + result = (AstRegion *) astNullRegion( frm, NULL, "Negated=1", status ); +``` + +`GetRegionProps`, which the writer calls for every spatial Region, tests for a negated Region first and only then for a negated NullRegion (`stcschan.c:1506-1522`): + +```c + if( astGetNegated( spreg ) ) { + spaceid = NOT_ID; + astNegate( spreg ); + ... + astMapPut0C( spprops, "ID", "Not", NULL ); + ... + astNegate( spreg ); + +/* Store properties that are specific to AllSky sub-phrases (i.e. none)... */ + } else if( astIsANullRegion( spreg ) && astGetNegated( spreg ) ) { + spaceid = ALLSKY_ID; + astMapPut0C( spprops, "ID", "AllSky", NULL ); +``` + +The second branch requires `Negated` to be true, but every Region with `Negated` true has already taken the first branch, so the AllSky branch is dead code. +A negated NullRegion is instead written as `Not` around a plain NullRegion, which the writer rejects as unsupported. + +### Observed + +``` +== Bug 2a: read AllSky (valid STC-S 1.33) + astRead -> NullRegion, status 0 + Class NullRegion, Negated 1, Bounded 1 +== Bug 2b: write what was read straight back + astWrite -> 0, status 0 + warning 1: The supplied NullRegion cannot be written out since STC-S does not support NullRegion regions. + +== Bug 2c: write a negated NullRegion (all sky) directly + astWrite -> 0, status 0 + warning 1: The supplied NullRegion cannot be written out since STC-S does not support NullRegion regions. +``` + +The class documentation says that any Object returned by `astRead` can be written again with `astWrite`; for `AllSky` it cannot. + +### Fix + +Test for the negated NullRegion before the general `Negated` test, so that the AllSky branch is reached: + +```c + if( astIsANullRegion( spreg ) && astGetNegated( spreg ) ) { + spaceid = ALLSKY_ID; + astMapPut0C( spprops, "ID", "AllSky", NULL ); + } else if( astGetNegated( spreg ) ) { + spaceid = NOT_ID; + ... +``` + +### Status + +Fixed upstream by `32a08178` (Starlink/ast PR 122), as proposed. + +## Defect 3: a crash on an unsupported spatial unit + +### Source + +`Read` declares a word context and never initializes it (`stcschan.c:2581`): + +```c + WordContext con; /* Context for finding next source word */ +``` + +The only initialization of a `WordContext` is in `ReadProps`, on its own local variable (`stcschan.c:3624`), and that context is freed before `ReadProps` returns. +When the space sub-phrase names a unit that AST does not accept for a spherical frame, `Read` builds its message with `ContextFragment( &con, ... )` (`stcschan.c:2970-2973`): + +```c + } else if( astOK ) { + astError( AST__BADIN, "astRead(StcsChan): Unsupported " + "units (%s) for a spherical co-ordinate system " + "within an STC-S description: '%s'.", status, + cval, ContextFragment( &con, &fbuf, status ) ); + } +``` + +`ContextFragment` walks `con->words[]` from `con->next` and appends each non-NULL pointer as a string, so it dereferences whatever the stack held. + +### Observed + +``` +== Bug 3: an unsupported unit for a spherical system +Segmentation fault (core dumped) +``` + +valgrind (Appendix B) reports "Use of uninitialised value" and then "Invalid read of size 8" in `ContextFragment`, called from `Read`, with the uninitialized value "created by a stack allocation at astRead_". +Whether it crashes or prints garbage depends on the stack contents, so the message is undefined even when the process survives. + +The document that triggers it, `Circle ICRS 10 20 1 unit m`, is valid STC-S: the grammar allows `m` as a spatial unit (below). +AST is entitled to refuse it for a spherical frame, but with an error, not a crash. + +### Fix + +`Read` has no word context at this point: `ReadProps` has consumed the words and freed its context, and the properties are now in the KeyMap. +Either drop the fragment from this message and quote the `UNIT` property alone, which is what the message already names in `%s`, or have `ReadProps` store the fragment around the unit word in the properties KeyMap for `Read` to quote. +The same `con` declaration should go. + +### Status + +Fixed upstream by `fa5833a5` (Starlink/ast PR 122), which drops the fragment and names the unit. + +## Defect 4: a description starting with `Time` crashes the reader + +### Source + +`ReadProps` recognizes the time sub-phrase identifiers and records which one it read in `timeid`, which later decides that a KeyMap is made for the sub-phrase's properties. +For `Time` the assignment is inside the comment that starts on the line before (`stcschan.c:3714-3716`): + +```c + } else if( astChrMatch( word, "Time" ) ) { + look_for = TIME_SCALE; /* After "Time", we move on to find the + timeid = TIME_ID; time-scale, not the fill factor */ +``` + +So after `Time` no time sub-phrase is recorded, no KeyMap is made, and the next property is stored through the KeyMap pointer, which is still NULL. + +### Observed + +At `37f52a20` (Appendix C, case `time`; valgrind's report is in Appendix D): + +``` +$ ./probe time +== the Time sub-phrase +Segmentation fault (core dumped) +[exit 139] +``` + +valgrind reports an "Invalid read of size 8" at address `0x10` in `astMapPut0C_`, called from `ReadProps`. +The same program against a build of `u/timj/stcs-corpus` reads the description (Appendix C, "Defect 4 with the fix"). + +### Recorded, and the port + +`c-library-quirks.md`, "An STC-S description starting with a `Time` sub-phrase crashes the reader". +The port reads the sub-phrase as the comment intends, and the corpus document `time-identifier.stcs` (`Time TT MJD 50000.0`) holds it; its expectation files are what C gives with the fix applied. + +### Status + +Fixed on `u/timj/stcs-corpus` by `57d97fc0`, which moves `timeid = TIME_ID;` out of the comment. + +## Defect 5: a time with a Format is written without its TimeOrigin + +### Source + +`StoreTimeProp` formats a time with a TimeFrame `fmtfrm`. +When the TimeFrame `frm` of the time sub-phrase has its Format set, `fmtfrm` is that TimeFrame itself rather than a copy (`stcschan.c:5892-5893`): + +```c + if( astTestFormat( frm, 0 ) ) { + fmtfrm = astClone( frm ); +``` + +`frm` is the sub-phrase Region's own Frame (`spfrm = astRegFrame( spreg )`, `stcschan.c:6776`; `RegFrame` returns `astGetFrame` of the Region's FrameSet, a pointer to the Frame and not a copy, `region.c:4296`). +`StoreTimeProp` then clears the TimeOrigin of `fmtfrm` and converts from `frm` to `fmtfrm` (`stcschan.c:5953` and `5956`): + +```c + astClearTimeOrigin( fmtfrm ); + ... + fs = astConvert( frm, fmtfrm, "" ); +``` + +Both pointers name the same Frame, whose TimeOrigin is now cleared, so the conversion is a UnitMap and the time, an offset from the TimeOrigin, is formatted as an absolute time. + +### Observed + +A time Interval from 0.5 to 1 day after MJD 50000 (Appendix C, case `timeorigin`): + +``` + [TimeInterval TT TOPOCENTER 1995-10-10T12:00:32.2 1995-10-11T00:00:32.2 ] + ... + with Format=iso.0T: + [TimeInterval TT TOPOCENTER 1858-11-17T12:00:00 1858-11-18T00:00:00 ] +``` + +The caller's Interval keeps its TimeOrigin (the probe reads it back set after the write); the Frame cleared is the one inside the Region the write splits from it. + +### Recorded, and the port + +`c-library-quirks.md`, "An STC-S write of a time in a TimeFrame with a set Format ignores its TimeOrigin". +The port formats with a copy whose TimeOrigin is cleared and writes `1995-10-10T12:00:32 1995-10-11T00:00:32` (`a_time_with_a_format_is_written_as_an_absolute_time` in `test_stcschan.rs`). + +### Status + +Open. +A fix: `astCopy( frm )` in place of `astClone( frm )` at `stcschan.c:5893`. + +## Defect 6: a refused object is reported as written + +### Source + +For an Object that is neither a Region nor a KeyMap, and for a KeyMap holding nothing it can write, `Write` adds a warning (`stcschan.c:6230` and `6198`) and goes on with no AREA and no COORDS, where (`stcschan.c:6245` and `6256`) + +```c + ret = coords ? WriteRegion( this, coords, props, status ) : 1; + ... + if( ret ) WriteProps( this, props, status ); +``` + +sets `ret` to 1 and writes the empty properties KeyMap, which writes nothing. + +### Observed + +Appendix C, case `refused`: + +``` + a SkyFrame: + write -> 1, status 0 + W: Failed to write out a SkyFrame through a StcsChan. The StcsChan class cannot be used to write out a SkyFrame. + an empty KeyMap: + write -> 1, status 0 + W: The supplied KeyMap does not contains anything that can be written out through a StcsChan. + a NullRegion: + write -> 0, status 0 +``` + +So `astWrite` returns 1 for a SkyFrame or an empty KeyMap and 0 for a Region it cannot describe. + +### Recorded, and the port + +`c-library-quirks.md`, "An StcsChan write of an object it cannot write returns 1". +The port mirrors it, and its documentation of `write` for StcsChan says so: "An object that is neither a Region nor a KeyMap, or a KeyMap with nothing to write, adds a warning, writes nothing and returns 1." + +### Status + +Open. +A fix: set `ret` to 0 with each of the warnings. + +## Defect 7: an Error range is averaged with memory never set + +### Source + +`Read` reads up to `2*naxes` Error values into the local array `vals` and, when there are more than `naxes`, takes each axis's error as the mean of its value and the value `naxes` places later (`stcschan.c:3068-3076`): + +```c + if( astMapGet1D( props, "DERROR", 2*naxes, &nval, vals ) ) { + if( nval > naxes ) { + ... + for( iaxis = 0; iaxis < naxes; iaxis++ ) { + vals[ iaxis ] = 0.5*( vals[ iaxis ] + vals[ iaxis + naxes ] ); +``` + +With more than `naxes` values but fewer than `2*naxes`, as in `Error 0.1 0.2 0.3` for two axes, `vals[ iaxis + naxes ]` at line 3075 is an element `astMapGet1D` did not set. + +### Observed + +Appendix C, case `errorrange`, gives an uncertainty whose second axis depends on that element: + +``` + read 'Circle ICRS 10 20 1 Error 0.1 0.2 0.3' -> Circle, status 0 + ... + uncertainty widths (arcsec): 1532.41 719.085 +``` + +and valgrind reports "Conditional jump or move depends on uninitialised value(s)" in `astInitBox_` called from `SetUnc` called from `Read`, with the value "created by a stack allocation at astRead_" (Appendix D). + +### Recorded, and the port + +`c-library-quirks.md`, "An STC-S space Error range of fewer than two values per axis is averaged with unset memory". +The port gives such an axis the one value it has, with C's warning (`an_error_range_is_replaced_by_its_mid_value` in `test_stcschan.rs`). + +### Status + +Open. +A fix: report an error unless the number of values is one, `naxes` or `2*naxes`, or replicate the last value as the branch below does for too few. + +## Defect 8: a StcsChan dump with StcsCoords or StcsProps set cannot be read back + +### Source + +`Dump` writes the attributes under their own names (`stcschan.c:8058` and `8066`), `StcsCoords` (ten characters) and `StcsProps` (nine), while the Native reader matches a name of at most eight (`MAX_NAME "8"`, `channel.c:150`, used at `channel.c:1200` and `1231`) and reports anything else as "Cannot interpret the input data" (`channel.c:1302`). + +### Observed + +Appendix C, case `dump`: + +``` + [ StcsCoords = 1 # Read the STC Coordinates component] + ... + ERR: astRead(Channel): Cannot interpret the input data: "StcsCoords = 1". + ERR: Error while reading a StcsChan from a Channel. + read back -> NULL, status 233933202 +``` + +(233933202 is AST__BADIN.) `StcsArea` (eight characters) and `StcsLen` read back. + +### Recorded, and the port + +`c-library-quirks.md`, "A StcsChan dump with a set StcsCoords or StcsProps cannot be read back", which also cites the oracle case `stcschan_set` in `tools/oracle_fixtures/channel_dump_probe.c`. +The port mirrors it, as its Native parser has the same limit (`unreadable_dumps_match_c` in `test_channel_dump_oracle.rs`). + +### Status + +Open. +A fix: write and read names of at most eight characters, such as `StcsCrd` and `StcsPrp`. + +## Defect 9: writing a properties KeyMap clears KeyError in the caller's KeyMaps + +### Source + +When the Object written is a KeyMap holding a sub-phrase key, `Write` uses it as the properties through a second pointer, not a copy (`stcschan.c:6185`, `props = astClone( object )`), and `WriteProps` takes `SPACE_PROPS` from it with `astMapGet0A`, which returns a pointer to the stored KeyMap. +`PutRegionProps` calls `astSetKeyError( km, 1 )` on entry and `astSetKeyError( km, 0 )` before it returns (`stcschan.c:2435` and `2553`), and `SetKeyError` sets the attribute in every KeyMap held in `km` at any depth (`keymap.c:9580`, the recursion at `keymap.c:9651`). + +### Observed + +Appendix C, case `keyerror`, writes a Union whose first argument KeyMap has KeyError set: + +``` + before: SPACE_PROPS KeyError set 0; REGION1 KeyError 1 + [Union ICRS ( Circle 1 2 3 Circle 4 5 6 ) ] + write -> 1, status 0 + after: SPACE_PROPS KeyError set 1, value 0; REGION1 KeyError 0 +``` + +### Recorded, and the port + +`c-library-quirks.md`, "An STC-S write of a properties KeyMap clears KeyError in the caller's space sub-phrase KeyMap". +The port works on owned copies, so the caller's KeyMap is unchanged; the text written is the same. +The related entry "An STC-S write of a KeyMap changes the properties KeyMap it is given" records the other side effect of the same aliasing. + +### Status + +Open. +A fix: give `PutRegionProps` a deep copy (`astCopy`) of the space sub-phrase KeyMap. + +## Defect 10: the last of several numbers takes the first one's format + +### Source + +`GetFmt` chooses the format of the `i`th word of a property by counting the digits of each word up to it, and goes back to the first word's counts when it reaches the end of the property (`stcschan.c:1189-1196`): + +```c +/* If we find the terminating null before we have found the i'th word, + break out of the loop using the first word instead of the i'th word. */ + if( *p == 0 ) { + exp = exp0; + before = before0; + after = after0; + break; + } +``` + +The test is reached after the `i`th word has been counted too, so when that word is the last one the loop takes the first word's counts, which the comment intends only for an `i` past the end. + +### Observed + +Appendix C, case `getfmt`, reads two Circles and writes them back: + +``` + read 'Circle ICRS 10.25 20.1e0 1' -> KeyMap, status 0 + [Circle ICRS TOPOCENTER 10.25 20.10 1 ] + read 'Circle ICRS 20.1e0 10.25 1' -> KeyMap, status 0 + [Circle ICRS TOPOCENTER 20.1 10.2 1 ] +``` + +The second center value takes the first's format each time: `%.2f` from `10.25`, and `%.3g` from `20.1e0`, which writes `10.25` as `10.2`. + +### Recorded, and the port + +`c-library-quirks.md`, "An STC-S value written for the last of several words takes the format of the first". +The port mirrors it (`get_fmt` in `write.rs`). + +### Status + +Open. +A fix: go back to the first word only when the end is reached before word `i`, as in `if( *p == 0 && j < i )`. + +## Defect 11: the Moc of a Region covering the whole sky is empty + +### Source + +`astAddRegion` (`moc.c` `AddRegion`, from `moc.c:2464`) adds no cells for a Region covering the whole sky. +Reading the source, the cells are lost in the negation that ends the search. +`AddRegion` records the Region's `Negated` flag and clears it (`negated = astGetNegated( picked )`, `moc.c:2688`), and negates the Region itself when `RegionBeyondBox` finds that it extends beyond the box round its boundary (`moc.c:2886-2888`). +For the negated NullRegion that `AllSky` reads to, the search is of a NullRegion, and for an Interval with unbounded sky axes it is of the Interval's complement; either way it finds no cells. +`NegateRanges` then returns at once for a Moc with no ranges (`moc.c:6784-6786`, "Nothing to do if the Moc is empty, or no ranges are to be negated"), so the negation of no cells is no cells rather than the whole sky. +This is the early return of the quirks entry "A Moc of a Region covering nearly the whole sky is empty at low orders", reported upstream as [Starlink/ast issue 116](https://github.com/Starlink/ast/issues/116); the path through it was read from the source and not re-probed. + +### Observed + +Appendix C, case `moc`, at MaxOrder and MinOrder 8: + +``` + read 'AllSky ICRS' -> NullRegion, status 0 + MocLength 0 + read 'Circle ICRS 10 20 1' -> Circle, status 0 + MocLength 25 +``` + +The whole sky is 12 cells at order 0. +The quirks entry records the same for `Union ICRS ( AllSky Circle 10 20 1 )` and for `TimeInterval ... AllSky ICRS`, whose Interval has unbounded sky axes. + +### Recorded, and the port + +`c-library-quirks.md`, "A Moc of a Region covering the whole sky is empty". +The port's Moc gives the same empty Moc, as its `add_region` follows C's; `CDS_MOC_EXCLUDED` in `test_stcschan_corpus.rs` holds the four corpus documents for which the CDS `moc` crate gives the whole sky, and `excluded_documents_still_disagree` fails when one starts agreeing. + +### Status + +Open. +A fix, the one issue 116 proposes for `NegateRanges`: when the ranges to be negated are empty, add the single range from 0 to 12·4^order − 1. + +## Defect 12: a Position is written with its position twice + +### Source + +For a PointList, `GetRegionProps` stores the point as the `POSITION` item of the space sub-phrase (`stcschan.c:1800`), and `PutRegionProps` writes it as the shape's arguments (`stcschan.c:2473-2474`). +`WriteProps` then writes `POSITION` again, as the sub-phrase's Position property, with no prefix because the identifier is `Position` (`stcschan.c:6387-6388`): + +```c + prefix = !astChrMatch( id, "Position" ) ? "Position " : NULL; + line = AddItem( this, spprops, "POSITION", prefix, line, &nc, &crem, linelen, status ); +``` + +### Observed + +Appendix C, case `position`: + +``` + read 'Position ICRS 10 20' -> KeyMap, status 0 + [Position ICRS TOPOCENTER 10 20 10 20 ] + write -> 1, status 0 + ERR: astRead(StcsChan): Unsupported or irrelevant word '10' found in STC-S space sub-phrase: 'Position ICRS TOPOCENTER 10 20 10'. + read 'Position ICRS TOPOCENTER 10 20 10 20 ' -> NULL, status 233933202 +``` + +So no PointList written by a StcsChan can be read back. + +### Recorded, and the port + +`c-library-quirks.md`, "An STC-S Position sub-phrase is written with its position twice". +The port writes what C writes; the corpus document `position.stcs` holds it, in `READ_BACK_EXCLUDED` in `test_stcschan_corpus.rs`. + +### Status + +Open. +A fix: skip the Position property in `WriteProps` when the identifier is `Position`. + +## Defect 13: AllSky after a time sub-phrase reads to a Region that writes nothing + +### Source + +`TimeInterval TT 1996-01-01T00:00:00 1996-01-01T00:30:00 AllSky ICRS` reads to an Interval whose sky axes are unbounded. +`GetRegionProps` describes an Interval as a PositionInterval, which needs bounds, and refuses one whose bound is undefined (`stcschan.c:1603-1609` and `1627-1633`): + +```c + if( lbnd[ i ] == AST__BAD || lbnd[ i ] == DBL_MAX || + lbnd[ i ] == -DBL_MAX ) { + astAddWarning( this, 1, "Spatial axis %d has an undefined " + "lower limit.", "astWrite", status, i + 1 ); +``` + +with the same for the upper limit, the warnings at lines 1605 and 1629. + +### Observed + +Appendix C, case `allsky`: + +``` + read 'TimeInterval TT 1996-01-01T00:00:00 1996-01-01T00:30:00 AllSky ICRS' -> Interval, status 0 + ... + write -> 0, status 0 + W: Spatial axis 1 has an undefined lower limit. + W: Spatial axis 1 has an undefined upper limit. +``` + +### Recorded, and the port + +`c-library-quirks.md`, "An STC-S AllSky after a time sub-phrase reads to a Region that cannot be written". +The port mirrors it; the corpus document `timeinterval-allsky.stcs` holds it, in `WRITES_NOTHING_EXCLUDED`, with empty `.out` files. + +### Status + +Open. +A fix: write an Interval whose space axes are all unbounded as `AllSky`. + +## Defect 14: the StcsChan test's PROPS check cannot fail + +### Source + +`teststcschan.c` `test1` reads `doc3` with StcsProps set and compares the KeyMap with the fixture `stcschan-test1-doc3-props.ast` by `astEqual` (`ast_tester/teststcschan.c:522-525`). +A KeyMap does not override `astEqual`, and the Object version (`object.c:1926`) compares only the structure size and the class name, so the check passes for any KeyMap. +Because it could not fail, the fixture had drifted from what `astRead` returns: it lacks the numeric `D*` and `MJD*` entries and the KeyError the space sub-phrase is left with, and its `ID` and `REFPOS` words are normalized where `astRead` keeps them as written. + +### Observed + +Appendix C, case `equal`, compares a KeyMap holding `ID` with one holding `NREG` and `FRAME`: + +``` + astEqual -> 1 +``` + +### Recorded, and the port + +`c-library-quirks.md`, "The StcsChan test compares the PROPS KeyMap with a fixture it does not match". +The port's test compares the KeyMap's dump text with the fixture, and asserts the entries C returns (`doc3_props_keymap_is_the_keymap_c_reads` in `test_stcschan.rs`). + +### Status + +Fixed on `u/timj/stcs-corpus` by `f4957c34`, which regenerates `stcschan-test1-doc3-props.ast` from `astRead` and has `teststcschan.c` compare the dump as text; the port mirrors the regenerated fixture. +`astEqual` on a KeyMap still compares the class alone, as KeyMap does not override the Object class's `Equal`; giving KeyMap its own would be a separate change. + +## Defect 15: two demonstration programs never display their warnings + +### Source + +`stcschan-demo4.c` and `stcschan-demo5.c` display the warnings of each read only when no error has occurred, but test the `int *` argument `status` rather than the value it points to (`stcschan-demo4.c:238`, `stcschan-demo5.c:270`): + +```c + if( warnings && !status && astOK ) { +``` + +`status` is never NULL there, so the test is always false. + +### Observed + +Appendix E: with `stcs-ex1.txt` and `stcs-ex2.txt`, `stcschan-demo4` prints only its verdict, and the same program with `!*status` prints the four warnings first; `stcschan-demo5` likewise. + +### Recorded, and the port + +No quirks entry: the examples `stcschan_demo4.rs` and `stcschan_demo5.rs` record it in their header comments, and display the warnings as the corrected programs do. + +### Status + +Fixed on `u/timj/stcs-corpus` by `665f1823` (`!status` to `!*status` in both). + +## Defect 16: a redshift sub-phrase ending at `unit` or at its type crashes the reader + +### Source + +`GetNextWord` returns NULL at the end of the text, and two places in `ReadProps` compare the word with a string without testing it. +After a `unit` in any sub-phrase, the test of the unit word against the units each sub-phrase allows begins (`stcschan.c:4497`): + +```c + while( ( timeid != NULL_ID && ( !strcmp( word, "s" ) || +``` + +For a redshift sub-phrase, the last in a description, the word after `unit` is NULL when the text ends there. +After the redshift type, the test for a Doppler definition is (`stcschan.c:4436-4441`): + +```c + if( astChrMatch( word, "VELOCITY" ) || + astChrMatch( word, "REDSHIFT" ) ) { + astMapPut0C( props, "TYPE", word, NULL ); + word = GetNextWord( this, &con, status ); + } + + if( astChrMatch( word, "OPTICAL" ) || +``` + +`astChrMatch` dereferences both of its arguments. + +### Observed + +Appendix F, cases `rs-unit-end` (`RedshiftInterval 1 2 unit`) and `rs-type-end` (`Redshift VELOCITY`): each crashes with SIGSEGV in three runs of three, and valgrind reports an "Invalid read of size 1" at address `0x0`, in `ReadProps` for the first and in `astChrMatch_` called from `ReadProps` for the second. +Neither document is complete STC-S, a `unit` needing a unit and a redshift a value, so AST is entitled to refuse both, but with an error, not a crash. + +### Recorded, and the port + +`c-library-quirks.md`, "An STC-S redshift sub-phrase ending at `unit` or at its type crashes the reader". +The port reports C's unsupported-units error for the first, showing the NULL word as `(null)` as C's message would, and for the second stores no Doppler definition and reads on; `c_crashes` in `crates/starlink-ast/tests/test_stcschan.rs` pins both. +No corpus document holds them, as C crashes on both. + +### Status + +Open. +A fix: test `word` for NULL before both comparisons. + +## Defect 17: an unsupported space flavor crashes the reader after its error + +### Source + +`Read` reports an error for a flavor other than `SPHER2`, `CART1`, `CART2` and `CART3`, and goes on with no Frame (`stcschan.c:2900-2904`): + +```c + } else { + astError( AST__BADIN, "astRead(StcsChan): Unsupported " + "space 'Flavor' (%s) found in STC-S description.", + status, cval ); + } +``` + +For a Frame that is not a SkyFrame it then splits the units property into words (`stcschan.c:3020`) and frees them (`stcschan.c:3033-3035`): + +```c + words = astChrSplit( cval, &nword ); + ... + for( iaxis = 0; iaxis < nword; iaxis++ ) { + words[ iaxis ] = astFree( words[ iaxis ] ); + } +``` + +With the error status set, `astChrSplit` returns NULL before it sets `*n` (`memory.c`, "Check the global error status"), and `nword` is a local that is never initialized (`stcschan.c:2606`), so the loop reads `words[ iaxis ]` through a NULL pointer for as many axes as the stack gave `nword`. + +### Observed + +Appendix F, cases `spher3` (`Circle ICRS SPHER3 10 20 30 1`) and `unitspher` (`Circle ICRS UNITSPHER 10 20 1`): each reports the error and then crashes with SIGSEGV in three runs of six; on the others `astRead` returns NULL with AST__BADIN. +valgrind reports "Conditional jump or move depends on uninitialised value(s)" in `Read`, with the value "created by a stack allocation" in `Read`. + +### Recorded, and the port + +`c-library-quirks.md`, "An STC-S `SPHER3` or `UNITSPHER` space flavor crashes the reader after its error". +The port reports the error and returns it (`a_three_dimensional_spherical_flavor_is_an_error` in `crates/starlink-ast/tests/test_stcschan.rs`). +No corpus document holds it, as C's result is not repeatable; the `SPHER3` document the final review asked for was dropped from the corpus for that reason. + +### Status + +Open. +A fix: initialize `nword` to 0, or skip the units when the status is bad. + +## Defect 18: a redshift with no Doppler definition cannot be written + +### Source + +`Read` takes a redshift sub-phrase with no type to be of type `REDSHIFT` (`stcschan.c:3295`), but sets the System of its SpecFrame only inside the test for a Doppler definition (`stcschan.c:3300-3340`): + +```c + if( !astMapGet0C( props, "TYPE", &type ) ) type = "REDSHIFT"; + ... + if( astMapGet0C( props, "DOPPLERDEF", &cval ) ){ +``` + +So `Redshift TOPOCENTER 0.5` reads to a SpecFrame left at its default System, wavelength. +`WriteRegion` asks for a unit of `km/s` for any System but `AST__REDSHIFT` (`stcschan.c:7563`), which a wavelength axis refuses. +With a Resolution, PixSize or Size in the properties, `WriteRegion` instead converts the Region to the System its Type and DopplerDef give, taking a missing Type to be `VELOCITY` (`stcschan.c:7522`), where the reader took it to be `REDSHIFT`. + +### Observed + +Appendix F, cases `rs-redshift` and `rs-res`: + +``` +== rs-redshift +!! AST: Error in routine main at line 17 in file rw.c. +! astMatch(SpecFrame): Inappropriate units (km/s) specified for a wavelength axis. +! Unable to accommodate the attribute setting "Unit(1)=km/s". +read: KeyMap status 0 +write: 0 status 233934002 +== rs-res +read: KeyMap status 0 +OUT[Redshift TOPOCENTER VELOCITY OPTICAL -299787.45800039015 Resolution 0.1 ] +write: 1 status 0 +``` + +The first cannot be written at all; the second writes the redshift 0.5, held as a wavelength, as an optical velocity. + +### Recorded, and the port + +`c-library-quirks.md`, "An STC-S redshift with no Doppler definition reads to a wavelength axis and cannot be written". +The port mirrors both, with C's messages and text (`redshift_writes` in `crates/starlink-ast/tests/test_stcschan.rs`); the corpus documents of redshift sub-phrases give a type and a Doppler definition, or the `VELOCITY` type. + +### Status + +Open. +A fix: set the System to `AST__REDSHIFT` when there is no Doppler definition and the type is `REDSHIFT`, and default the type to `REDSHIFT` in `WriteRegion` as `Read` does. + +## Also observed + +A line the writer produces ends in a space when it has room for one (`PositionInterval ICRS TOPOCENTER 10 20 30 40 ` in defect 1b): `AddItem` appends one after each property value if there is room (`stcschan.c:518-521` at `51123135`). +`teststcschan.c`'s sink strips trailing blanks before comparing, with a comment that this makes the C comparisons behave like the Fortran original's fixed-length string equality, so the behavior is known and is not counted as a defect. +It is noted because a byte-for-byte consumer of the output has to expect it. +At `37f52a20` the space is added at `stcschan.c:534-537`, and only when the line has room for it, so with Indent set a line whose last value fills it to StcsLength ends without one (a C probe writing a hand-built properties KeyMap at Indent 1 gave `Circle ICRS TOPOCENTER 10 20 1` at StcsLength 30, and the same with a trailing space at 31). +The port writes the same, and its module documentation says so. + +## Can this be validated against third-party tooling? + +Defects 1 and 2 are about the STC-S language, and both the specification and an independent parser confirm the inputs are valid: + +- The IVOA STC-S grammar (Working Draft 1.0, 2013-09-17, section 5.2) lists the space sub-phrase identifiers as PositionInterval, AllSky, Circle, Ellipse, Box, Polygon, Convex and Position, with the productions `PositionInterval [fillfactor ] [] [] ...` and `AllSky [fillfactor ] [] []`, and gives the spatial units as `deg, arcmin, arcsec, m, mm, km, AU, pc, kpc, Mpc` (Appendix A's EBNF adds `rad`). + AST's class documentation cites version 1.30 of the earlier note, whose space sub-phrase has the same identifiers. +- The CDS `stc-s` Rust crate (, used by MOCPy's `MOC.from_stcs`) parses PositionInterval case-insensitively with lower and upper limits as a list of floats, its unit test using `PositionInterval ICRS GEOCENTER 170 -20 190 10 Resolution 0.0001`, and parses `AllSky` as the first of its geometries (`AllSkyParams::REGION_NAME`, `src/space/common/region.rs`). + So the documents AST rejects (defect 1) and cannot produce (defect 2) are accepted by an independent implementation. + +A semantic cross-check is possible once defect 1 is fixed: read a PositionInterval with AST, rasterize the Region into a Moc with `astAddRegion`, and compare with MOCPy's `MOC.from_stcs` of the same string at the same order. +Aladin also draws STC-S overlays and can show the same strings, which checks the geometry by eye. + +Defect 3 is a memory error, not a language question; the tooling that validates it is valgrind or MemorySanitizer, as in Appendix B. +No STC-S tool bears on it beyond confirming that `unit m` is legal input. + +## A defect in the CDS `moc` crate + +The port's corpus (`crates/starlink-ast/tests/fixtures/stcs/`) compares the Moc of each document's Region with the MOC the CDS `moc` Rust crate's `stcs2moc` makes from the same text, which is the cross-check proposed above. +At version 0.19.3, `visit_box` in `src/deser/stcs.rs` reads the first `BSIZE` value for both sizes of a Box, and for its position angle as well: + +```rust + let mut a_deg = skybox.bsize().first().ok_or_else(|| Stc2MocError::Custom { + msg: String::from("Empty bsize on latitude"), + })?; + let mut b_deg = skybox.bsize().first().ok_or_else(|| Stc2MocError::Custom { + msg: String::from("Empty bsize on longitude"), + })?; + let mut pa_deg = skybox.bsize().first().copied().unwrap_or(90.0); +``` + +The semi-minor size then always equals the semi-major one, and the check that follows, `b <= 0.0 || a <= b`, refuses it ("Box semi-minor axis out of bounds"), so `stcs2moc` refuses every Box. +This was found by reading the crate's source after it refused the corpus documents with a Box. +The corpus records it in the comments of `corpus.txt`: `adass2010-figure1`, `compound-union` and `nested-intersection-difference` are `moc=-`, each with a comment saying that the crate refuses every Box, and `adass2010-figure1-nobox`, the same figure without its Box, is compared in its place. +The four documents in `CDS_MOC_EXCLUDED` in `test_stcschan_corpus.rs` are a different matter, defect 11 above: the CDS MOC is right for them and the C library's Moc is empty. +A fix: take the second `BSIZE` value for the second size; the position angle then needs a value of its own, as an STC-S Box has none (`BoxParams` in `stc-s` 0.1.0 holds only a center and `bsize`). + +## Appendix A: reproducer + +Build against a cmake build of the AST source tree in `build/` (the `-last_*` libraries are the build's own; the rpath keeps a conda `libast` from being picked up instead): + +```sh +R=/path/to/ast/build +gcc stcs_bugs_probe.c -o probe -I "$R" -L "$R" \ + -Wl,-rpath,"$R" -Wl,--disable-new-dtags \ + -last -last_pal -last_cminpack -last_err \ + -last_grf3d -last_grf_5.6 -last_grf_3.2 -last_grf_2.0 -lyaml -lm +LD_LIBRARY_PATH= stdbuf -o0 ./probe +``` + +Output (libast 9.6.0, the status 233934250 is AST__MPKER): + +``` +libast version 9006000 + +== Bug 1a: read a PositionInterval (valid STC-S 1.33) + ERR (status 233934250): AST: Error in routine read_doc at line 59 in file stcs_bugs_probe.c. + ERR (status 233934250): astMapGet1D(KeyMap): No value was found for DHILIMIT in the supplied KeyMap. + astRead -> NULL, status 233934250 (AST__MPKER) + warnings: none + +== Bug 1b: write a Box as STC-S, then read AST's own output back + | PositionInterval ICRS TOPOCENTER 10 20 30 40 + astWrite -> 1, status 0 + warnings: none + ERR (status 233934250): AST: Error in routine read_doc at line 59 in file stcs_bugs_probe.c. + ERR (status 233934250): astMapGet1D(KeyMap): No value was found for DHILIMIT in the supplied KeyMap. + astRead -> NULL, status 233934250 (AST__MPKER) + warnings: none + +== Bug 2a: read AllSky (valid STC-S 1.33) + astRead -> NullRegion, status 0 + warning 1: AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. + Class NullRegion, Negated 1, Bounded 1 +== Bug 2b: write what was read straight back + astWrite -> 0, status 0 + warning 1: The supplied NullRegion cannot be written out since STC-S does not support NullRegion regions. + +== Bug 2c: write a negated NullRegion (all sky) directly + astWrite -> 0, status 0 + warning 1: The supplied NullRegion cannot be written out since STC-S does not support NullRegion regions. + +== Bug 3: an unsupported unit for a spherical system (message built from an uninitialized WordContext) +Segmentation fault (core dumped) +``` + +`stcs_bugs_probe.c`: + +```c +#include "ast.h" +#include +#include +#include + +#define MAXL 64 +#define LEN 400 + +static const char **src_lines; +static int src_i; +static char stored[ MAXL ][ LEN ]; +static int nstored; +static const char *stored_ptrs[ MAXL + 1 ]; + +static const char *source( void ) { + const char *l = src_lines[ src_i ]; + if ( l ) src_i++; + return l; +} + +static void sink( const char *line ) { + printf( " | %s\n", line ); + if ( nstored < MAXL ) { + strncpy( stored[ nstored ], line, LEN - 1 ); + stored[ nstored ][ LEN - 1 ] = 0; + nstored++; + } +} + +static void my_puterr( int status, const char *m ) { + printf( " ERR (status %d): %s\n", status, m ); +} + +static void show_warnings( AstStcsChan *ch ) { + AstKeyMap *w = astWarnings( ch ); + const char *msg; + char key[ 20 ]; + int i; + if ( !w ) { + printf( " warnings: none\n" ); + return; + } + for ( i = 0; ; i++ ) { + sprintf( key, "Warning_%d", i + 1 ); + if ( !astMapGet0C( w, key, &msg ) ) break; + printf( " warning %d: %s\n", i + 1, msg ); + } + w = astAnnul( w ); +} + +static AstObject *read_doc( const char **lines, const char *opts ) { + AstStcsChan *ch; + AstObject *obj; + src_lines = lines; + src_i = 0; + ch = astStcsChan( source, sink, "%s", opts ); + obj = astRead( ch ); + printf( " astRead -> %s, status %d%s\n", obj ? astGetC( obj, "Class" ) : "NULL", + astStatus, astStatus == AST__MPKER ? " (AST__MPKER)" : + astStatus == AST__BADIN ? " (AST__BADIN)" : "" ); + show_warnings( ch ); + if ( !astOK ) astClearStatus; + ch = astAnnul( ch ); + return obj; +} + +static int write_obj( AstObject *obj, const char *opts ) { + AstStcsChan *ch; + int n; + nstored = 0; + ch = astStcsChan( NULL, sink, "%s", opts ); + n = astWrite( ch, obj ); + printf( " astWrite -> %d, status %d\n", n, astStatus ); + show_warnings( ch ); + if ( !astOK ) astClearStatus; + ch = astAnnul( ch ); + return n; +} + +int main( void ) { + AstSkyFrame *sf; + AstBox *box; + AstNullRegion *nr; + AstObject *obj; + double p1[ 2 ], p2[ 2 ]; + int i; + + astSetPutErr( my_puterr ); + astBegin; + printf( "libast version %d\n", astVersion ); + + printf( "\n== Bug 1a: read a PositionInterval (valid STC-S 1.33)\n" ); + { + const char *d[] = { "PositionInterval ICRS 10 20 30 40", NULL }; + obj = read_doc( d, "ReportLevel=3" ); + if ( obj ) obj = astAnnul( obj ); + } + + printf( "\n== Bug 1b: write a Box as STC-S, then read AST's own output back\n" ); + sf = astSkyFrame( "System=ICRS" ); + p1[ 0 ] = 10.0 * AST__DD2R; p1[ 1 ] = 20.0 * AST__DD2R; + p2[ 0 ] = 30.0 * AST__DD2R; p2[ 1 ] = 40.0 * AST__DD2R; + box = astBox( sf, 1, p1, p2, NULL, " " ); + write_obj( (AstObject *) box, "ReportLevel=3" ); + for ( i = 0; i < nstored; i++ ) stored_ptrs[ i ] = stored[ i ]; + stored_ptrs[ nstored ] = NULL; + obj = read_doc( stored_ptrs, "ReportLevel=3" ); + if ( obj ) obj = astAnnul( obj ); + box = astAnnul( box ); + + printf( "\n== Bug 2a: read AllSky (valid STC-S 1.33)\n" ); + { + const char *d[] = { "AllSky ICRS", NULL }; + obj = read_doc( d, "ReportLevel=3" ); + if ( obj ) { + printf( " Class %s, Negated %d, Bounded %d\n", astGetC( obj, "Class" ), + astGetI( obj, "Negated" ), astGetI( obj, "Bounded" ) ); + printf( "== Bug 2b: write what was read straight back\n" ); + write_obj( obj, "ReportLevel=3" ); + obj = astAnnul( obj ); + } + } + + printf( "\n== Bug 2c: write a negated NullRegion (all sky) directly\n" ); + nr = astNullRegion( sf, NULL, "Negated=1" ); + write_obj( (AstObject *) nr, "ReportLevel=3" ); + nr = astAnnul( nr ); + + printf( "\n== Bug 3: an unsupported unit for a spherical system " + "(message built from an uninitialized WordContext)\n" ); + { + const char *d[] = { "Circle ICRS 10 20 1 unit m", NULL }; + obj = read_doc( d, "ReportLevel=3" ); + if ( obj ) obj = astAnnul( obj ); + } + + sf = astAnnul( sf ); + astEnd; + return 0; +} +``` + +## Appendix B: valgrind on defect 3 + +``` +$ LD_LIBRARY_PATH= valgrind -q --track-origins=yes ./probe +... +== Bug 3: an unsupported unit for a spherical system (message built from an uninitialized WordContext) +==1495035== Use of uninitialised value of size 8 +==1495035== at 0x4E5E977: ContextFragment (in .../build/libast.so.9.6.0) +==1495035== by 0x4E6C23A: Read (in .../build/libast.so.9.6.0) +==1495035== by 0x109732: read_doc (in /tmp/stcsbugs/probe) +==1495035== by 0x10A17E: main (in /tmp/stcsbugs/probe) +==1495035== Uninitialised value was created by a stack allocation +==1495035== at 0x492D963: astRead_ (in .../build/libast.so.9.6.0) +==1495035== +==1495035== Invalid read of size 8 +==1495035== at 0x4E5E977: ContextFragment (in .../build/libast.so.9.6.0) +==1495035== by 0x4E6C23A: Read (in .../build/libast.so.9.6.0) +==1495035== by 0x109732: read_doc (in /tmp/stcsbugs/probe) +==1495035== by 0x10A17E: main (in /tmp/stcsbugs/probe) +==1495035== Address 0x2028a694f0 is not stack'd, malloc'd or (recently) free'd +==1495035== +==1495035== Process terminating with default action of signal 11 (SIGSEGV): dumping core +==1495035== Access not within mapped region at address 0x2028A694F0 +==1495035== at 0x4E5E977: ContextFragment (in .../build/libast.so.9.6.0) +==1495035== by 0x4E6C23A: Read (in .../build/libast.so.9.6.0) +``` + +## Appendix C: reproducer for defects 4 to 14 + +Built against a cmake build of `37f52a20` (`git archive 37f52a20` configured with `-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DAST_BUILD_FORTRAN=OFF`) in `$R`, and run one case per process so that a crash ends only its own case: + +```sh +gcc stcs_defects_probe.c -o probe -I "$R" -L "$R" \ + -Wl,-rpath,"$R" -Wl,--disable-new-dtags \ + -last -last_pal -last_cminpack -last_err \ + -last_grf3d -last_grf_5.6 -last_grf_3.2 -last_grf_2.0 -lyaml -lm +for c in time timeorigin refused errorrange dump keyerror getfmt moc position allsky equal; do + echo "\$ ./probe $c"; LD_LIBRARY_PATH= ./probe $c; echo "[exit $?]" +done +``` + +Output (status 233933202 is AST__BADIN): + +``` +$ ./probe time +== the Time sub-phrase +Segmentation fault (core dumped) +[exit 139] +$ ./probe timeorigin +== a time Interval in a TimeFrame with a TimeOrigin + [TimeInterval TT TOPOCENTER 1995-10-10T12:00:32.2 1995-10-11T00:00:32.2 ] + write -> 1, status 0 + TimeOrigin of the TimeFrame after that write: set 1 + with Format=iso.0T: + [TimeInterval TT TOPOCENTER 1858-11-17T12:00:00 1858-11-18T00:00:00 ] + write -> 1, status 0 + TimeOrigin of the Interval's Frame after the write: set 1 +[exit 0] +$ ./probe refused +== objects the write cannot describe + a SkyFrame: + write -> 1, status 0 + W: Failed to write out a SkyFrame through a StcsChan. The StcsChan class cannot be used to write out a SkyFrame. + an empty KeyMap: + write -> 1, status 0 + W: The supplied KeyMap does not contains anything that can be written out through a StcsChan. + a NullRegion: + write -> 0, status 0 + W: The supplied NullRegion cannot be written out since STC-S does not support NullRegion regions. +[exit 0] +$ ./probe errorrange +== an Error of three values for two axes + read 'Circle ICRS 10 20 1 Error 0.1 0.2 0.3' -> Circle, status 0 + W: AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. + W: An STC-S space sub-phrase contains an Error range. AST does not support error ranges so the mid value will be used as the error. + uncertainty widths (arcsec): 1532.41 719.085 +[exit 0] +$ ./probe dump +== a StcsChan dump with StcsCoords set + [ Begin StcsChan # STC-S I/O Channel] + [ StcsCoords = 1 # Read the STC Coordinates component] + [ End StcsChan] + ERR: AST: Error in routine main at line 139 in file stcs_defects_probe.c. + ERR: astRead(Channel): Cannot interpret the input data: "StcsCoords = 1". + ERR: Error while reading a StcsChan from a Channel. + read back -> NULL, status 233933202 +[exit 0] +$ ./probe keyerror +== KeyError of the caller's space sub-phrase KeyMaps + before: SPACE_PROPS KeyError set 0; REGION1 KeyError 1 + [Union ICRS ( Circle 1 2 3 Circle 4 5 6 ) ] + write -> 1, status 0 + after: SPACE_PROPS KeyError set 1, value 0; REGION1 KeyError 0 +[exit 0] +$ ./probe getfmt +== the format of the last of two words + read 'Circle ICRS 10.25 20.1e0 1' -> KeyMap, status 0 + W: AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. + [Circle ICRS TOPOCENTER 10.25 20.10 1 ] + write -> 1, status 0 + read 'Circle ICRS 20.1e0 10.25 1' -> KeyMap, status 0 + W: AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. + [Circle ICRS TOPOCENTER 20.1 10.2 1 ] + write -> 1, status 0 +[exit 0] +$ ./probe moc +== the Moc of a Region covering the whole sky + read 'AllSky ICRS' -> NullRegion, status 0 + W: AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. + MocLength 0 + read 'Circle ICRS 10 20 1' -> Circle, status 0 + W: AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. + MocLength 25 +[exit 0] +$ ./probe position +== a Position written and read back + read 'Position ICRS 10 20' -> KeyMap, status 0 + W: AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. + [Position ICRS TOPOCENTER 10 20 10 20 ] + write -> 1, status 0 + ERR: AST: Error in routine read_doc at line 50 in file stcs_defects_probe.c. + ERR: astRead(StcsChan): Unsupported or irrelevant word '10' found in STC-S space sub-phrase: 'Position ICRS TOPOCENTER 10 20 10'. + read 'Position ICRS TOPOCENTER 10 20 10 20 ' -> NULL, status 233933202 +[exit 0] +$ ./probe allsky +== AllSky after a time sub-phrase + read 'TimeInterval TT 1996-01-01T00:00:00 1996-01-01T00:30:00 AllSky ICRS' -> Interval, status 0 + W: AST only supports topocentric time frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. + W: AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. + write -> 0, status 0 + W: Spatial axis 1 has an undefined lower limit. + W: Spatial axis 1 has an undefined upper limit. +[exit 0] +$ ./probe equal +== astEqual on two different KeyMaps + astEqual -> 1 +[exit 0] +``` + +### Defect 4 with the fix + +The `time` case against a cmake build of `u/timj/stcs-corpus` at `f4957c34`, built and run as above: + +``` +== the Time sub-phrase + read 'Time TT MJD 50000' -> NULL, status 0 + W: AST only supports topocentric time frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. +``` + +NULL is the right result: a single time has no area, and only StcsArea is set. + +### The program + +`stcs_defects_probe.c`: + +```c +/* Reproduces the StcsChan defects found while porting the class. + Usage: stcs_defects_probe , one case per run so that a crash ends + only its own case. */ +#include "ast.h" +#include +#include + +static const char *doc; +static int done; +static const char *source( void ) { + if( done ) return NULL; + done = 1; + return doc; +} + +#define MAXL 16 +static char lines[ MAXL ][ 400 ]; +static int nlines; +static void sink( const char *line ) { + printf( " [%s]\n", line ); + if( nlines < MAXL ) { + strncpy( lines[ nlines ], line, 399 ); + lines[ nlines++ ][ 399 ] = 0; + } +} + +static void puterr( int status, const char *msg ) { + printf( " ERR: %s\n", msg ); +} + +static void show_warnings( AstStcsChan *ch ) { + AstKeyMap *km = astWarnings( ch ); + const char *msg; + char key[ 20 ]; + int i; + if( !km ) return; + for( i = 1; i <= astMapSize( km ); i++ ) { + snprintf( key, sizeof( key ), "Warning_%d", i ); + if( astMapGet0C( km, key, &msg ) ) printf( " W: %s\n", msg ); + } + km = astAnnul( km ); +} + +static AstObject *read_doc( const char *text, const char *attrs ) { + AstStcsChan *ch = astStcsChan( source, NULL, "ReportLevel=3" ); + AstObject *obj; + if( attrs ) astSet( ch, "%s", attrs ); + doc = text; + done = 0; + obj = astRead( ch ); + printf( " read '%s' -> %s, status %d\n", text, + obj ? astGetC( obj, "Class" ) : "NULL", astStatus ); + show_warnings( ch ); + if( !astOK ) astClearStatus; + ch = astAnnul( ch ); + return obj; +} + +static int write_obj( AstObject *obj ) { + AstStcsChan *ch = astStcsChan( NULL, sink, "ReportLevel=3" ); + int n; + nlines = 0; + n = astWrite( ch, obj ); + printf( " write -> %d, status %d\n", n, astStatus ); + show_warnings( ch ); + if( !astOK ) astClearStatus; + ch = astAnnul( ch ); + return n; +} + +int main( int argc, char **argv ) { + const char *c = argc > 1 ? argv[ 1 ] : ""; + AstObject *obj; + astSetPutErr( puterr ); + astBegin; + + if( !strcmp( c, "time" ) ) { + printf( "== the Time sub-phrase\n" ); + fflush( stdout ); + obj = read_doc( "Time TT MJD 50000", NULL ); + + } else if( !strcmp( c, "timeorigin" ) ) { + double lo = 0.5, hi = 1.0; + AstTimeFrame *tf; + AstInterval *iv; + printf( "== a time Interval in a TimeFrame with a TimeOrigin\n" ); + tf = astTimeFrame( "TimeOrigin=MJD 50000,TimeScale=TT" ); + iv = astInterval( tf, &lo, &hi, NULL, " " ); + write_obj( (AstObject *) iv ); + printf( " TimeOrigin of the TimeFrame after that write: set %d\n", + astTest( tf, "TimeOrigin" ) ); + astSet( tf, "Format=iso.0T" ); + iv = astInterval( tf, &lo, &hi, NULL, " " ); + printf( " with Format=iso.0T:\n" ); + write_obj( (AstObject *) iv ); + { + AstFrame *rf = astGetRegionFrame( iv ); + printf( " TimeOrigin of the Interval's Frame after the write: set %d\n", + astTest( rf, "TimeOrigin" ) ); + rf = astAnnul( rf ); + } + + } else if( !strcmp( c, "refused" ) ) { + AstSkyFrame *sf = astSkyFrame( "System=ICRS" ); + printf( "== objects the write cannot describe\n" ); + printf( " a SkyFrame:\n" ); + write_obj( (AstObject *) sf ); + printf( " an empty KeyMap:\n" ); + write_obj( (AstObject *) astKeyMap( " " ) ); + printf( " a NullRegion:\n" ); + write_obj( (AstObject *) astNullRegion( sf, NULL, " " ) ); + + } else if( !strcmp( c, "errorrange" ) ) { + AstRegion *unc; + double lbnd[ 2 ], ubnd[ 2 ]; + printf( "== an Error of three values for two axes\n" ); + obj = read_doc( "Circle ICRS 10 20 1 Error 0.1 0.2 0.3", NULL ); + if( obj ) { + unc = astGetUnc( (AstRegion *) obj, 0 ); + astGetRegionBounds( unc, lbnd, ubnd ); + printf( " uncertainty widths (arcsec): %.6g %.6g\n", + ( ubnd[ 0 ] - lbnd[ 0 ] )*AST__DR2D*3600.0, + ( ubnd[ 1 ] - lbnd[ 1 ] )*AST__DR2D*3600.0 ); + } + + } else if( !strcmp( c, "dump" ) ) { + AstStcsChan *ch = astStcsChan( NULL, NULL, "StcsCoords=1" ); + AstChannel *in; + AstObject *back; + FILE *f; + int i; + printf( "== a StcsChan dump with StcsCoords set\n" ); + nlines = 0; + astWrite( astChannel( NULL, sink, " " ), ch ); + f = fopen( "stcschan.dump", "w" ); + for( i = 0; i < nlines; i++ ) fprintf( f, "%s\n", lines[ i ] ); + fclose( f ); + in = astChannel( NULL, NULL, "SourceFile=stcschan.dump" ); + back = astRead( in ); + printf( " read back -> %s, status %d\n", + back ? astGetC( back, "Class" ) : "NULL", astStatus ); + + } else if( !strcmp( c, "keyerror" ) ) { + AstKeyMap *props = astKeyMap( " " ), *sp, *r1, *r2, *got, *gotr1; + printf( "== KeyError of the caller's space sub-phrase KeyMaps\n" ); + sp = astKeyMap( " " ); + astMapPut0C( sp, "ID", "Union", NULL ); + astMapPut0C( sp, "FRAME", "ICRS", NULL ); + astMapPut0I( sp, "NREG", 2, NULL ); + r1 = astKeyMap( "KeyError=1" ); + astMapPut0C( r1, "ID", "Circle", NULL ); + astMapPut0C( r1, "CENTRE", "1 2", NULL ); + astMapPut0C( r1, "RADIUS", "3", NULL ); + r2 = astKeyMap( " " ); + astMapPut0C( r2, "ID", "Circle", NULL ); + astMapPut0C( r2, "CENTRE", "4 5", NULL ); + astMapPut0C( r2, "RADIUS", "6", NULL ); + astMapPut0A( sp, "REGION1", r1, NULL ); + astMapPut0A( sp, "REGION2", r2, NULL ); + astMapPut0A( props, "SPACE_PROPS", sp, NULL ); + astMapGet0A( props, "SPACE_PROPS", &got ); + astMapGet0A( got, "REGION1", &gotr1 ); + printf( " before: SPACE_PROPS KeyError set %d; REGION1 KeyError %d\n", + astTest( got, "KeyError" ), astGetI( gotr1, "KeyError" ) ); + write_obj( (AstObject *) props ); + printf( " after: SPACE_PROPS KeyError set %d, value %d; REGION1 KeyError %d\n", + astTest( got, "KeyError" ), astGetI( got, "KeyError" ), + astGetI( gotr1, "KeyError" ) ); + + } else if( !strcmp( c, "getfmt" ) ) { + printf( "== the format of the last of two words\n" ); + obj = read_doc( "Circle ICRS 10.25 20.1e0 1", + "StcsArea=1,StcsCoords=1,StcsProps=1" ); + if( obj ) write_obj( obj ); + obj = read_doc( "Circle ICRS 20.1e0 10.25 1", + "StcsArea=1,StcsCoords=1,StcsProps=1" ); + if( obj ) write_obj( obj ); + + } else if( !strcmp( c, "moc" ) ) { + const char *docs[] = { "AllSky ICRS", "Circle ICRS 10 20 1", NULL }; + int i; + printf( "== the Moc of a Region covering the whole sky\n" ); + for( i = 0; docs[ i ]; i++ ) { + AstMoc *moc; + obj = read_doc( docs[ i ], NULL ); + moc = astMoc( "MaxOrder=8,MinOrder=8" ); + astAddRegion( moc, AST__OR, (AstRegion *) obj ); + printf( " MocLength %d\n", astGetI( moc, "MocLength" ) ); + } + + } else if( !strcmp( c, "position" ) ) { + int i; + printf( "== a Position written and read back\n" ); + obj = read_doc( "Position ICRS 10 20", + "StcsArea=1,StcsCoords=1,StcsProps=1" ); + write_obj( obj ); + for( i = 0; i < nlines; i++ ) { + read_doc( lines[ i ], "StcsArea=1,StcsCoords=1,StcsProps=1" ); + } + + } else if( !strcmp( c, "allsky" ) ) { + printf( "== AllSky after a time sub-phrase\n" ); + obj = read_doc( "TimeInterval TT 1996-01-01T00:00:00 1996-01-01T00:30:00 AllSky ICRS", NULL ); + if( obj ) write_obj( obj ); + + } else if( !strcmp( c, "equal" ) ) { + AstKeyMap *a = astKeyMap( " " ), *b = astKeyMap( " " ); + printf( "== astEqual on two different KeyMaps\n" ); + astMapPut0C( a, "ID", "Circle", NULL ); + astMapPut0I( b, "NREG", 2, NULL ); + astMapPut0C( b, "FRAME", "ICRS", NULL ); + printf( " astEqual -> %d\n", astEqual( a, b ) ); + } + + astEnd; + return 0; +} +``` + +## Appendix D: valgrind on defects 4 and 7 + +Defect 4, `LD_LIBRARY_PATH= valgrind -q ./probe time`: + +``` +== the Time sub-phrase +==3311040== Invalid read of size 8 +==3311040== at 0x49947A7: astMapPut0C_ (in /lscratch/timj/ast-pin-37f52a20/build/libast.so.9.6.0) +==3311040== by 0x4DF7AA1: ReadProps (in /lscratch/timj/ast-pin-37f52a20/build/libast.so.9.6.0) +==3311040== by 0x4DFFB28: Read (in /lscratch/timj/ast-pin-37f52a20/build/libast.so.9.6.0) +==3311040== by 0x10A922: read_doc (in /lscratch/timj/stcs-probe/probe) +==3311040== by 0x10AD06: main (in /lscratch/timj/stcs-probe/probe) +==3311040== Address 0x10 is not stack'd, malloc'd or (recently) free'd +==3311040== +==3311040== +==3311040== Process terminating with default action of signal 11 (SIGSEGV): dumping core +==3311040== Access not within mapped region at address 0x10 +``` + +Defect 7, `LD_LIBRARY_PATH= valgrind -q --track-origins=yes ./probe errorrange`, the first of its reports (valgrind gives 210 lines naming uninitialized values as the value spreads through the uncertainty's construction): + +``` +==3311033== Conditional jump or move depends on uninitialised value(s) +==3311033== at 0x48B8643: astInitBox_ (in /lscratch/timj/ast-pin-37f52a20/build/libast.so.9.6.0) +==3311033== by 0x48B890C: astBox_ (in /lscratch/timj/ast-pin-37f52a20/build/libast.so.9.6.0) +==3311033== by 0x4DF5FFD: SetUnc (in /lscratch/timj/ast-pin-37f52a20/build/libast.so.9.6.0) +==3311033== by 0x4E00DE2: Read (in /lscratch/timj/ast-pin-37f52a20/build/libast.so.9.6.0) +==3311033== by 0x10A922: read_doc (in /lscratch/timj/stcs-probe/probe) +==3311033== by 0x10B2A5: main (in /lscratch/timj/stcs-probe/probe) +==3311033== Uninitialised value was created by a stack allocation +==3311033== at 0x48C2963: astRead_ (in /lscratch/timj/ast-pin-37f52a20/build/libast.so.9.6.0) +==3311033== +``` + +## Appendix E: the demonstration programs, defect 15 + +`stcschan-demo4.c` and `stcschan-demo5.c` at `37f52a20`, each built as in Appendix C and also with the one test corrected: + +```sh +sed '238s/!status/!*status/' stcschan-demo4.c > stcschan-demo4-fixed.c +sed '270s/!status/!*status/' stcschan-demo5.c > stcschan-demo5-fixed.c +``` + +and run on `stcs-ex1.txt` and `stcs-ex2.txt` from `crates/starlink-ast/tests/fixtures/programs/stcschan-demos/` (`stcs-ex1.txt` is the C distribution's; `stcs-ex2.txt`, written for the port, is the same with its Circle and Position moved to 179.5). +The STC-S line `stcschan-demo5` writes ends in a space, which this listing, like the valgrind listings' blank `==pid==` lines, shows without it: + +``` +$ ./stcschan-demo4 stcs-ex1.txt stcs-ex2.txt + + There is partial overlap between the two Regions. + +[exit 0] +$ ./stcschan-demo4-fixed stcs-ex1.txt stcs-ex2.txt + +The following warnings were issued reading file 'stcs-ex1.txt': + +- AST only supports topocentric time frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. + +- AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. + +The following warnings were issued reading file 'stcs-ex2.txt': + +- AST only supports topocentric time frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. + +- AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. + + There is partial overlap between the two Regions. + +[exit 0] +$ ./stcschan-demo5 stcs-ex2.txt stcs-ex1.txt +TimeInterval TT TOPOCENTER 1996-01-01T00:00:00.0 1996-01-01T00:30:00.0 Error 1.2 Circle ICRS TOPOCENTER 179.5 -11.5 0.5 Error 0.000889 0.0008890014 Spectral BARYCENTER 1420.4 unit MHz RedshiftInterval BARYCENTER VELOCITY OPTICAL 200 2300 +[exit 0] +$ ./stcschan-demo5-fixed stcs-ex2.txt stcs-ex1.txt + +The following warnings were issued reading file 'stcs-ex2.txt': + +- AST only supports topocentric time frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. + +- AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. + +The following warnings were issued reading file 'stcs-ex1.txt': + +- AST only supports topocentric time frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. + +- AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'GEOCENTER'. +TimeInterval TT TOPOCENTER 1996-01-01T00:00:00.0 1996-01-01T00:30:00.0 Error 1.2 Circle ICRS TOPOCENTER 179.5 -11.5 0.5 Error 0.000889 0.0008890014 Spectral BARYCENTER 1420.4 unit MHz RedshiftInterval BARYCENTER VELOCITY OPTICAL 200 2300 +[exit 0] +``` + +## Appendix F: reproducer for defects 16 to 18 + +Built against a cmake build of `u/timj/stcs-corpus` at `5fa64ee5` in `$R`, whose `stcschan.c` differs from `37f52a20` only by the fix of defect 4, and run one document per process. +`rw.c` reads the file named on its command line through a StcsChan with StcsArea, StcsCoords and StcsProps set, prints the class read and the warnings, and writes what it read back through a StcsChan at Indent 0 and StcsLength 70: + +```sh +gcc rw.c -o rw -I "$R" -L "$R" -Wl,-rpath,"$R" -Wl,--disable-new-dtags \ + -last -last_pal -last_cminpack -last_err \ + -last_grf3d -last_grf_5.6 -last_grf_3.2 -last_grf_2.0 -lyaml -lm +printf 'RedshiftInterval 1 2 unit' > rs-unit-end.stcs +printf 'Redshift VELOCITY' > rs-type-end.stcs +printf 'Circle ICRS SPHER3 10 20 30 1' > spher3.stcs +printf 'Circle ICRS UNITSPHER 10 20 1' > unitspher.stcs +printf 'Redshift TOPOCENTER 0.5' > rs-redshift.stcs +printf 'Redshift TOPOCENTER 0.5 Resolution 0.1' > rs-res.stcs +for n in rs-unit-end rs-type-end spher3 unitspher; do + echo "== $n"; LD_LIBRARY_PATH= ./rw $n.stcs +done +``` + +Three runs of the loop (status 233933202 is AST__BADIN, 233934002 AST__BADUN): + +``` +--- run 1 +== rs-unit-end +Segmentation fault (core dumped) +== rs-type-end +Segmentation fault (core dumped) +== spher3 +!! AST: Error in routine main at line 13 in file rw.c. +! astRead(StcsChan): Unsupported space 'Flavor' (SPHER3) found in STC-S description. +read: NULL status 233933202 +== unitspher +!! AST: Error in routine main at line 13 in file rw.c. +! astRead(StcsChan): Unsupported space 'Flavor' (UNITSPHER) found in STC-S description. +read: NULL status 233933202 +--- run 2 +== rs-unit-end +Segmentation fault (core dumped) +== rs-type-end +Segmentation fault (core dumped) +== spher3 +!! AST: Error in routine main at line 13 in file rw.c. +! astRead(StcsChan): Unsupported space 'Flavor' (SPHER3) found in STC-S description. +Segmentation fault (core dumped) +== unitspher +!! AST: Error in routine main at line 13 in file rw.c. +! astRead(StcsChan): Unsupported space 'Flavor' (UNITSPHER) found in STC-S description. +Segmentation fault (core dumped) +--- run 3 +== rs-unit-end +Segmentation fault (core dumped) +== rs-type-end +Segmentation fault (core dumped) +== spher3 +!! AST: Error in routine main at line 13 in file rw.c. +! astRead(StcsChan): Unsupported space 'Flavor' (SPHER3) found in STC-S description. +read: NULL status 233933202 +== unitspher +!! AST: Error in routine main at line 13 in file rw.c. +! astRead(StcsChan): Unsupported space 'Flavor' (UNITSPHER) found in STC-S description. +read: NULL status 233933202 +``` + +An earlier three runs crashed for `spher3` in the first and third and for `unitspher` in the second and third, so each of the two crashed in three runs of six; `rs-unit-end` and `rs-type-end` crashed in all six. +The output of `rs-redshift` and `rs-res` is in defect 18. + +valgrind (`valgrind --track-origins=yes ./rw `), for `rs-unit-end`: + +``` +==3557078== Invalid read of size 1 +==3557078== at 0x4E6D05E: ReadProps (in .../build/libast.so.9.6.0) +==3557078== by 0x4E72B28: Read (in .../build/libast.so.9.6.0) +==3557078== by 0x109475: main (in .../rw) +==3557078== Address 0x0 is not stack'd, malloc'd or (recently) free'd +==3557078== Process terminating with default action of signal 11 (SIGSEGV): dumping core +``` + +for `rs-type-end`: + +``` +==3557099== Invalid read of size 1 +==3557099== at 0x4CB7ABE: astChrMatch_ (in .../build/libast.so.9.6.0) +==3557099== by 0x4E6A9F0: ReadProps (in .../build/libast.so.9.6.0) +==3557099== by 0x4E72B28: Read (in .../build/libast.so.9.6.0) +==3557099== by 0x109475: main (in .../rw) +==3557099== Address 0x0 is not stack'd, malloc'd or (recently) free'd +==3557099== Process terminating with default action of signal 11 (SIGSEGV): dumping core +``` + +and for `spher3`, a run that did not crash: + +``` +!! AST: Error in routine main at line 13 in file rw.c. +! astRead(StcsChan): Unsupported space 'Flavor' (SPHER3) found in STC-S description. +==3557529== Conditional jump or move depends on uninitialised value(s) +==3557529== at 0x4E73B4B: Read (in .../build/libast.so.9.6.0) +==3557529== by 0x109475: main (in .../rw) +==3557529== Uninitialised value was created by a stack allocation +==3557529== at 0x4E72ACC: Read (in .../build/libast.so.9.6.0) +read: NULL status 233933202 +``` + +`rw.c`: + +```c +#include +#include +#include +#include "ast.h" +static char buf[100000]; static int done; +static const char *src(void){ if(done) return NULL; done=1; return buf; } +static void sink(const char *l){ printf("OUT[%s]\n", l); } +int main(int argc,char**argv){ + int status=0; astWatch(&status); + FILE *f=fopen(argv[1],"r"); size_t n=fread(buf,1,sizeof buf-1,f); buf[n]=0; fclose(f); + for(char *p=buf;*p;p++) if(*p=='\n') *p=' '; + AstStcsChan *ch=astStcsChan(src,NULL,"ReportLevel=3,StcsArea=1,StcsCoords=1,StcsProps=1"); + AstObject *o=astRead(ch); + printf("read: %s status %d\n", o?astGetC(o,"Class"):"NULL", status); + AstKeyMap *w=astWarnings(ch); if(w){ const char*m; char k[30]; for(int i=1;;i++){sprintf(k,"Warning_%d",i); if(!astMapGet0C(w,k,&m))break; printf("W: %s\n",m);} } + astClearStatus; + if(o){ AstStcsChan *c2=astStcsChan(NULL,sink,"ReportLevel=3,Indent=0,StcsLength=70"); int nw=astWrite(c2,o); printf("write: %d status %d\n",nw,status); + w=astWarnings(c2); if(w){ const char*m; char k[30]; for(int i=1;;i++){sprintf(k,"Warning_%d",i); if(!astMapGet0C(w,k,&m))break; printf("WW: %s\n",m);} } } + return 0; +} +``` From f07a749875b4b61d77138f860f40792c12ba7ba6 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Thu, 3 Dec 2026 16:22:45 -0800 Subject: [PATCH 7/7] docs/issues: defect 19, every Polygon vertex written in the first vertex's format GetRegionProps asks GetFmt once, for word 0 of the VERTICES property, and formats every vertex with that one format, so "Polygon ICRS 10 22.125 11.5 21.25 10.75 20" is written as "Polygon ICRS TOPOCENTER 10 22 12 21 11 20", and a Box in ICRS, written as a Polygon with the default format, is written as different text when read back. The report gains the defect, its table row and the Appendix F runs that show it; the copy stays identical to the port's. Generated with AI Co-Authored-By: SLAC AI --- docs/issues/2026-12-02-stcschan-c-defects.md | 98 +++++++++++++++++++- 1 file changed, 95 insertions(+), 3 deletions(-) diff --git a/docs/issues/2026-12-02-stcschan-c-defects.md b/docs/issues/2026-12-02-stcschan-c-defects.md index 4713c09d..a660ba33 100644 --- a/docs/issues/2026-12-02-stcschan-c-defects.md +++ b/docs/issues/2026-12-02-stcschan-c-defects.md @@ -2,10 +2,10 @@ Found 2026-12-02 and 2026-12-03 while designing and porting the Rust StcsChan, in Starlink/ast's `src/stcschan.c`, its test, its demonstration programs and, for one, `src/moc.c`, with one more in the CDS `moc` Rust crate the port's corpus is checked against. Defects 1 to 3 were found in the design, at `5112313575156ef5d89c8321a1d48967f06a02c1` (`v9.6.0-31-g51123135`, 2026-11-30), and are fixed upstream by Starlink/ast PR 122 (`564746e2`, `32a08178`, `fa5833a5`), which is in the port's pin `37f52a20`. -Defects 4 to 15 were found while porting, and 16 to 18 in the final review of the port, at `37f52a20`, and their line numbers are at that commit. +Defects 4 to 15 were found while porting, and 16 to 19 in the final review of the port, at `37f52a20`, and their line numbers are at that commit. Three of them are fixed on the submodule branch `u/timj/stcs-corpus`, which is waiting to go upstream (the port's PLAN.md §8 names its head); the rest are open. Defects 1 to 3 were not reached by `ast_tester/teststcschan.c` until PR 122 added the documents that reach them, which is why they had gone unnoticed; 14 is in that test, and 15 in the demonstration programs. -Each was found by reading the source or by the corpus comparison, and then confirmed by running a C program against a cmake build of the C library on Linux x86_64: Appendix A for 1 to 3, Appendix C for 4 to 14, Appendix E for 15 and Appendix F for 16 to 18, with valgrind's reports in Appendices B, D and F. +Each was found by reading the source or by the corpus comparison, and then confirmed by running a C program against a cmake build of the C library on Linux x86_64: Appendix A for 1 to 3, Appendix C for 4 to 14, Appendix E for 15 and Appendix F for 16 to 19, with valgrind's reports in Appendices B, D and F. | | Defect | Effect | Severity | Status | |---|---|---|---|---| @@ -27,6 +27,7 @@ Each was found by reading the source or by the corpus comparison, and then confi | 16 | `ReadProps` compares the NULL word at the end of the text after a redshift `unit` or type | `RedshiftInterval 1 2 unit` and `Redshift VELOCITY` crash `astRead` with SIGSEGV | Crash on malformed input | Open | | 17 | `Read` frees the words of a units split it never made, counted by an uninitialized `nword` | `SPHER3` and `UNITSPHER` report their error and then crash `astRead` with SIGSEGV on some runs | Crash on unsupported input | Open | | 18 | `Read` sets no System for a redshift with no Doppler definition, and `WriteRegion` defaults its type differently | `Redshift TOPOCENTER 0.5` cannot be written; with a Resolution it is written as an optical velocity of −299787 km/s | Functional, round trip broken | Open | +| 19 | `GetRegionProps` formats every Polygon vertex with the format of the first vertex word | `Polygon ICRS 10 22.125 11.5 21.25 10.75 20` is written as `Polygon ICRS TOPOCENTER 10 22 12 21 11 20`; a Box in ICRS is written as a Polygon whose text is not a fixed point | Wrong output | Open | The third-party defect is in its own section below ("A defect in the CDS `moc` crate"). @@ -765,6 +766,58 @@ The port mirrors both, with C's messages and text (`redshift_writes` in `crates/ Open. A fix: set the System to `AST__REDSHIFT` when there is no Doppler definition and the type is `REDSHIFT`, and default the type to `REDSHIFT` in `WriteRegion` as `Read` does. +## Defect 19: every vertex of a Polygon is written in the first vertex's format + +### Source + +The Polygon branch of `GetRegionProps` asks `GetFmt` once, for word 0 of the `VERTICES` property, and formats every vertex coordinate with the one format (`stcschan.c:1726-1737`): + +```c +/* Create a string holding the formatted vertex axis values, scaling + to the required units. Use the Frame's Digits attribute to specify + how many digits to use when formatting the axis values. */ + GetFmt( "VERTICES", spprops, 0, defdigs, fmt, status ); + nc = 0; + for( j = 0; j < np; j++ ) { + p = points + j; + for( i = 0; i < nspace; i++ ) { + if( *p != AST__BAD ) { + FormatValue( buf, sizeof( buf ), fmt, scale*(*p), status ); +``` + +`GetFmt` derives a format from the digits of the word asked for, so every vertex is written with the digits of the first vertex's longitude. +This is not defect 10, which is `GetFmt`'s own fallback to the first word when the word asked for is the last; here the caller asks for the first word every time. + +### Observed + +Appendix F, "Defect 19", reads each text and writes it back, then reads the written text and writes it again: + +``` +Polygon ICRS 10 22.125 11.5 21.25 10.75 20 + -> Polygon ICRS TOPOCENTER 10 22 12 21 11 20 +Polygon ICRS 10.75 22.125 11.5 21.25 10 20 + -> Polygon ICRS TOPOCENTER 10.75 22.12 11.50 21.25 10.00 20.00 +Box ICRS 10 20 4 6 + -> Polygon ICRS TOPOCENTER 7.830413 22.98523 12.16959 22.98523 12.08844 16.98936 7.911559 16.98936 + -> Polygon ICRS TOPOCENTER 7.830413 22.985230 12.169590 22.985230 12.088440 16.989360 7.911559 16.989360 +``` + +The first text has four of its six values rounded to integers, the format of `10`, so the Polygon written is not the one read; the written text then reads and writes as itself, so nothing later shows the loss. +The second shows the format is the first word's, `%.2f` from `10.75`. +The third is a Box in ICRS, which AST writes as a Polygon: it was not read from STC-S, so it has no `VERTICES` property and takes the default `%.7g`; read back, the text sets the format from its first word, `%.6f` from `7.830413`, and is written differently, so the written text of a Box is not a fixed point. +The CDS `stc-s` crate (0.1.0) prints the first text back as `Polygon ICRS 10 22.125 11.5 21.25 10.75 20`, and the CDS `moc` crate's `stcs2moc` makes different MOCs from that text and from the text AST writes for it (422 and 487 cells at order 10, 5990 and 7078 at order 12). + +### Recorded, and the port + +`c-library-quirks.md`, "An STC-S Polygon is written with every vertex in the first vertex's format". +The port writes the same three texts (`write.rs`, the Polygon branch of `get_region_props`, `get_fmt("VERTICES", spprops, 0, defdigs)`), checked with a program using its public API that reads with StcsArea, StcsCoords and StcsProps set and writes at Indent 0 and StcsLength 70. +The port's `box-icrs` document is read in `tools/oracle_fixtures/stcschan_read_probe.c` but is not a corpus document, because its `.out` text reads and then writes other text, which neither the corpus's fixed-point check nor `READ_BACK_EXCLUDED` describes. + +### Status + +Open. +A fix: ask `GetFmt` for word `j*nspace + i` inside the loop over vertices, so each value is written with its own digits, together with the fix of defect 10 so that the last word keeps its own format. + ## Also observed A line the writer produces ends in a space when it has room for one (`PositionInterval ICRS TOPOCENTER 10 20 30 40 ` in defect 1b): `AddItem` appends one after each property value if there is room (`stcschan.c:518-521` at `51123135`). @@ -1467,7 +1520,7 @@ TimeInterval TT TOPOCENTER 1996-01-01T00:00:00.0 1996-01-01T00:30:00.0 Error 1.2 [exit 0] ``` -## Appendix F: reproducer for defects 16 to 18 +## Appendix F: reproducer for defects 16 to 19 Built against a cmake build of `u/timj/stcs-corpus` at `5fa64ee5` in `$R`, whose `stcschan.c` differs from `37f52a20` only by the fix of defect 4, and run one document per process. `rw.c` reads the file named on its command line through a StcsChan with StcsArea, StcsCoords and StcsProps set, prints the class read and the warnings, and writes what it read back through a StcsChan at Indent 0 and StcsLength 70: @@ -1570,6 +1623,45 @@ and for `spher3`, a run that did not crash: read: NULL status 233933202 ``` +### Defect 19 + +The same `rw`, on a Polygon with mixed decimals, on one whose first vertex has two decimals, and on a Box in ICRS, then on the text each one wrote: + +```sh +printf 'Polygon ICRS 10 22.125 11.5 21.25 10.75 20' > poly-a.stcs +printf 'Polygon ICRS 10.75 22.125 11.5 21.25 10 20' > poly-b.stcs +printf 'Box ICRS 10 20 4 6' > box-icrs.stcs +for n in poly-a poly-b box-icrs; do + echo "== $n"; LD_LIBRARY_PATH= ./rw $n.stcs + LD_LIBRARY_PATH= ./rw $n.stcs | sed -n 's/^OUT\[\(.*\) \]$/\1/p' > $n-out.stcs + echo " read back:"; LD_LIBRARY_PATH= ./rw $n-out.stcs | grep OUT +done +``` + +``` +== poly-a +read: KeyMap status 0 +W: AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. +OUT[Polygon ICRS TOPOCENTER 10 22 12 21 11 20 ] +write: 1 status 0 + read back: +OUT[Polygon ICRS TOPOCENTER 10 22 12 21 11 20 ] +== poly-b +read: KeyMap status 0 +W: AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. +OUT[Polygon ICRS TOPOCENTER 10.75 22.12 11.50 21.25 10.00 20.00 ] +write: 1 status 0 + read back: +OUT[Polygon ICRS TOPOCENTER 10.75 22.12 11.50 21.25 10.00 20.00 ] +== box-icrs +read: KeyMap status 0 +W: AST only supports topocentric sky frames, so 'TOPOCENTER' will be used in place of 'UNKNOWNRefPos'. +OUT[Polygon ICRS TOPOCENTER 7.830413 22.98523 12.16959 22.98523 12.08844 16.98936 7.911559 16.98936 ] +write: 1 status 0 + read back: +OUT[Polygon ICRS TOPOCENTER 7.830413 22.985230 12.169590 22.985230 12.088440 16.989360 7.911559 16.989360 ] +``` + `rw.c`: ```c