Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/spst/lrpg/documentation/procedures/lrpg_using_filters.html
Дата изменения: Mon Dec 9 20:22:41 2002
Дата индексирования: Sun Mar 2 09:47:34 2014
Кодировка:

Поисковые слова: molecular cloud

Using filters from ~lrp/bin

This is a diverse collection of explanations of what tools reside in ~lrp/bin and a number of examples of how to use them.


Filter Dictionary:

STD I/O filters

File Operators

Other useful tools

Examples


Dictionary of filters:

STDI/O filters:

such as anywfpc, anyacs...


File operators:

getlinks ----Pass any visit which is part of a linkset.

getnolinks ----Pass any visit except those which are part of linksets.


Other useful tools:

simple_stat --- Takes an input filename as a command line argument. The file must contain a list of numbers, one per line, which it then computes statistics for and outputs a statistical summary to the screen.

cutorbs [a|m|e|s] --- Given a MOVE_IT, EXPIRE_LIST, or AVAILABLE report fed in via std i/o, this tool will cut out the orbits column for use in statistical summaries. The switch controls which of the report input formats is used for cutting out the orbits column.

susin --- Given two filenames, this tool will extract a list of sunit_ids from the first file and search for their occurrence in the second file.

susnotin ---Similar to susin, this tool will extract a list of sunit_ids from the first file and search in the second file for their occurrence. If it finds an occurrence, nothing is output. If it does not find an occurrence, then the record from the first file is echoed to the terminal.


Examples:

  • anystis < pullearly4

    Takes the file pullearly4 which contains sunit_ids and SI-usage and culls the list outputting only those visits which use STIS. The "<" pipe symbol is used because this filter operates on STD I/O and not on filenames.

  • getlinks nonmama_didnt_schedule

    getlinks filters out non-linked visits from the file nonmama_didnt_schedule, outputting only visits which are part of linksets to STD I/O. Note that this does not use the "<" input pipe symbol because it takes a filename as an argument and not STD I/O. In other words, this filter and getnolinks are unique in that they cannot be used as part of a standard I/O stream filter, as can anystis, nowfpc, or any of the other STD I/O filters.

  • getnolinks nonmama_didnt_schedule | dquotem

    Starts out similar to the previous example, except that only visits which are part of linksets are output. dquotem takes the output and runs a simple sed script which extracts the sunit_ids and encloses them in quotes. This is useful for compiling lists of visits which could be used in a SPIKE script (for example, to run the scheduler on, or delete plan windows for, etc.).

  • dquotemcomma < expire_list_report.

    dquotemcomma works similarly, except that it appends a comma after the close-quote. This is useful for generating lists of visits which can be used in an sql query. This example shows the "<" input pipe used because dquotem and dquotemcomma are STD I/O filters.

  • nomama < el_226a_post320 | stisccdprime | cutorbs_el > st_ccd_pr ; simple_stat st_ccd_pr

    The above example takes the file el_226a_post320 and input pipes it into the filter nomama using the "<" pipe because these filters (except for getlinks and getnolinks) operate on STD I/O and not on files. Output is then piped to another filter to extract only visits containing STIS/CCD Prime usage. cutorbs_el then extracts only the orbits column and the output is piped to the file st_ccd_pr. The statistics program simple_stat is then run on the file containing the orbits extracted from this list.

  • getnolinks expire_list_report | nocal | anystis | nogocar | nonic | cutorbs_el > cull_list ; simple_stat cull_list

    This example takes a file containing an expire_list report which has been copied into a unix file named expire_list_report and extracts all sunits which are not part of linksets. Then, the output is piped to remove (sequentially) calibrations, any visit not containing STIS usage (prime or parallel), GO/Carryovers, and visits containing NICMOS. The output then has only the orbits-column extracted and piped into the file cull_list. The last command takes the output file and runs it through the statistics program simple_stat.