| 1 | == VSO IDL Client Documentation : vso_search == |
| 2 | |
| 3 | For the time being (17 Sept 2010), this is basically just what you'd get from running `doc_menu, 'vso_search'` and `doc_menu, 'vso_get'`, but I hope to get a better list of real-world examples up. So, if you have a question about how to do something using the client, [wiki:People/JoeHourcle contact me], and I'll add to the list: |
| 4 | |
| 5 | {{{ |
| 6 | ;+ |
| 7 | ; Project : VSO |
| 8 | ; |
| 9 | ; Name : VSO_SEARCH() |
| 10 | ; |
| 11 | ; Purpose : Send a search request to VSO |
| 12 | ; |
| 13 | ; Explanation : Sends a query to VSO, to obtain metadata records corresponding |
| 14 | ; to the records that match the query parameters. |
| 15 | ; |
| 16 | ; Category : Utility, Class2, VSO |
| 17 | ; |
| 18 | ; Syntax : IDL> a = vso_search('2005-JAN-01', instrument='eit') |
| 19 | ; |
| 20 | ; Examples : IDL> a = vso_search(date='2004-01-01', provider='sdac') |
| 21 | ; IDL> a = vso_search(date='2002-1-4 - 2002-1-4T07:05', inst='mdi') |
| 22 | ; IDL> a = vso_search(date='2004/1/4T07:40-2004/1/4T07:45', inst='trace') |
| 23 | ; IDL> a = vso_search(date='2004-1-1', extent='CORONA', /FLAT) |
| 24 | ; IDL> a = vso_search(date='2001-1-1', physobs='los_magnetic_field') |
| 25 | ; IDL> a = vso_search(date='2004/1/1', inst='eit', /DEBUG) |
| 26 | ; IDL> a = vso_search('2004/1/1','2004/12/31', wave='171 Angstrom', inst='eit') |
| 27 | ; IDL> a = vso_search('2004/6/1','2004/6/15', wave='284-305 Angstrom', inst='eit') |
| 28 | ; IDL> a = vso_search('2005-JAN-1', inst='eit', /FLAT, /URL) |
| 29 | ; |
| 30 | ; IDL> print_struct, a |
| 31 | ; IDL> print_struct, a.time ; if not called w/ /FLATTEN |
| 32 | ; IDL> sock_copy, a.url ; if called w/ /URLS |
| 33 | ; IDL> vso_get, a ; attempt to download products |
| 34 | ; |
| 35 | ; |
| 36 | ; History : Ver 0.1, 27-Oct-2005, J A Hourcle. split this out from vso__define |
| 37 | ; Ver 1, 08-Nov-2005, J A Hourcle. Released |
| 38 | ; 12-Nov-2005, Zarro (L-3Com/GSFC) |
| 39 | ; - added TSTART/TEND for compatability with SSW usage. |
| 40 | ; - added _REF_EXTRA to communicate useful keywords |
| 41 | ; such as error messages. |
| 42 | ; Ver 1.1, 01-Dec-2005, Hourcle. Updated documentation |
| 43 | ; Ver 1.2, 02-Dec-2005, Zarro. Added call to VSO_GET_C |
| 44 | ; Ver 1.3, 18-May-2006, Zarro. Removed call to VSO_GET_C |
| 45 | ; because it confused the compiler |
| 46 | ; Ver 2.0, 06-Jul-2010, Hourcle. Updated documentation (see vso__define:buildquery) |
| 47 | ; |
| 48 | ; Contact : oneiros@grace.nascom.nasa.gov |
| 49 | ; http://virtualsolar.org/ |
| 50 | ; |
| 51 | ; Input: |
| 52 | ; (note -- you must either specify DATE, START_DATE or TSTART) |
| 53 | ; Optional Input: |
| 54 | ; (positional) |
| 55 | ; TSTART : date ; the start date |
| 56 | ; TEND : date ; the end date |
| 57 | ; Keywords: |
| 58 | ; DATE : string ; (start date) - (end date) |
| 59 | ; START_DATE : date ; the start date |
| 60 | ; END_DATE : date ; the end date |
| 61 | ; WAVE : string ; (min) - (max) (unit) |
| 62 | ; MIN_WAVE : string ; minimum spectral range |
| 63 | ; MAX_WAVE ; string ; maximum spectral range |
| 64 | ; UNIT_WAVE ; string ; spectral range units (Angstrom, GHz, keV) |
| 65 | ; EXTENT ; string ; VSO 'extent type' ... (FULLDISK, CORONA, LIMB, etc) |
| 66 | ; PHYSOBS ; string ; VSO 'physical observable' |
| 67 | ; PROVIDER ; string ; VSO ID for the data provider (SDAC, NSO, SHA, MSU, etc) |
| 68 | ; SOURCE ; string ; spacecraft or observatory (SOHO, YOHKOH, BBSO, etc) |
| 69 | ; synonyms : SPACECRAFT, OBSERVATORY |
| 70 | ; INSTRUMENT ; string ; instrument ID (EIT, SXI-0, SXT, etc) |
| 71 | ; synonym : TELESCOPE |
| 72 | ; DETECTOR ; string ; detector ID (C3, EUVI, COR2, etc.) |
| 73 | ; LAYOUT ; string ; layout of the data (image, spectrum, time_series, etc.) |
| 74 | |
| 75 | ; Keywords with limited support; (may not work with all archives) |
| 76 | ; LEVEL ; range* ; level of the data product (see below) |
| 77 | ; PIXELS ; range* ; number of pixels (see below) |
| 78 | ; RESOLUTION ; range* ; effective resolution (1 = full, 0.5 = 2x2 binned, etc) |
| 79 | ; PSCALE ; range* ; pixel scale, in arcseconds |
| 80 | ; NEAR_TIME ; date ; return record closest to the time. See below. |
| 81 | ; SAMPLE ; number ; attempt to return only one record per SAMPLE seconds. See below. |
| 82 | ; |
| 83 | ; (flag keywords) |
| 84 | ; QUICKLOOK ; boolean ; retrieve 'quicklook' data if available (see below) |
| 85 | ; LATEST ; boolean ; sets ( near=now, end=now, start=(now - 7 days) ) (see below) |
| 86 | ; URLS ; boolean ; attempt to get URLs, also |
| 87 | ; QUIET ; boolean ; don't print informational messages |
| 88 | ; DEBUG ; boolean ; print xml soap messages |
| 89 | ; FLATTEN ; boolean ; return vsoFlat Record (no sub-structures) |
| 90 | ; |
| 91 | ; (placeholders for the future) |
| 92 | ; FILTER ; string ; filter name (same problems as detector) |
| 93 | ; WAVETYPE ; string ; type of spectral range (LINE, NARROW, BROAD) |
| 94 | ; (WARNING : causing errors to be thrown when using 'wave') |
| 95 | ; CARTID ; string ; load a VSO Cart by its identifier |
| 96 | ; EVENT ; string ; search for data using an event from HEK |
| 97 | ; |
| 98 | ; Outputs: |
| 99 | ; a null pointer -> no matches were found |
| 100 | ; (or) |
| 101 | ; struct[n] : (vsoRecord or vsoFlatRecord) the metadata from the results |
| 102 | ; |
| 103 | ; Limitations : if using /URLS, you may wish to examine output.getinfo for messages |
| 104 | ; SHA requires 'STAGING' the data, and vso_get() does not yet have |
| 105 | ; support for anything other than direct URLs |
| 106 | ; |
| 107 | ; Other Notes : |
| 108 | ; |
| 109 | ; VSO Searching: |
| 110 | ; * By default, if a VSO data provider (ie, archive) does not support |
| 111 | ; a given search parameter, it will default to returning everything |
| 112 | ; that *might* match. This will occassionally result in many more |
| 113 | ; fields being returned than expected. |
| 114 | ; * Some data providers will limit the number of results that they |
| 115 | ; return, and you'll see a message such as: |
| 116 | ; Records Returned : SDAC : 1000/31772 |
| 117 | ; You will need to break the query into smaller time ranges to get all |
| 118 | ; of the records. Some data providers have implemented a 'summary rows' |
| 119 | ; feature where excessive returns will cause the archive to return records |
| 120 | ; corresponding to more than one record: |
| 121 | ; IDL> sot = vso_search( '2006-01-01', '2007-01-01', inst='sot' ) |
| 122 | ; Records Returned : SDAC_SOT : 488118/488118 |
| 123 | ; IDL> help, sot |
| 124 | ; SOT STRUCT = -> VSORECORD Array[5321] |
| 125 | ; Examine the 'info' field for a clue as to how many observations were |
| 126 | ; rolled up into each record. We hope to provide improved support |
| 127 | ; for expanding these 'summary' records into individual observations |
| 128 | ; in the future. |
| 129 | ; * If you have a query that's not returning what you're expecting, |
| 130 | ; please contact : joseph.a.hourcle AT nasa.gov |
| 131 | ; (and make sure to send the query!) |
| 132 | ; |
| 133 | ; Source / Instrument / Detector / Phys. Obs. / Layout / Extent Tye / etc: |
| 134 | ; * These items are enumerations. For a list of valid values, see: |
| 135 | ; http://sdac.virtualsolar.org/cgi/show_details |
| 136 | ; * We hope to soon have a 'vso_info' program to get the list from within IDL |
| 137 | ; |
| 138 | ; Dates within VSO_SEARCH: |
| 139 | ; * All dates are in UTC. |
| 140 | ; * Dates may be entered in any format accepted by 'anytim2utc', EXCEPT for the |
| 141 | ; 'DATE' keyword, which expects a string containing a range |
| 142 | ; (eg, '2004/01/01 - 2004/02/01') |
| 143 | ; * The 'NEAR_TIME' keyword is not yet supported by all data providers. As a |
| 144 | ; precaution, using NEAR without specifying a start or end time will use a |
| 145 | ; window of +/- 1hr to prevent extremely large data returns from data providers |
| 146 | ; that do not support this keyword, but it may cause the data provider to return |
| 147 | ; no data if there is no data in that 2 hr window. You can override the window. |
| 148 | ; * The /LATEST flag will set the following, where 'NOW' is the current time |
| 149 | ; START_DATE=(NOW - 7 days), END_DATE=NOW, NEAR_TIME=NOW |
| 150 | ; It will not override existing start dates, so if the data you're interested in |
| 151 | ; lags by more than a week, you can set START_DATE further into the past, and |
| 152 | ; it will still set END_DATE and NEAR_TIME for you. |
| 153 | ; * Order of precidence for start and end dates: |
| 154 | ; * DATE keyword (a string containing 2 dates) |
| 155 | ; * TSTART/TEND (positional parameters) |
| 156 | ; * START_DATE/END_DATE keywords |
| 157 | ; * If no end date is specified, it will use the start of the next day |
| 158 | ; |
| 159 | ; Numeric Ranges : (marked as 'range*') |
| 160 | ; * May be entered as a string or any numeric type for equality matching |
| 161 | ; * May be a string of the format '(min) - (max)' for range matching |
| 162 | ; * May be a string of the form '(operator) (number)' where operator is one of: |
| 163 | ; lt gt le ge < > <= >= |
| 164 | ; |
| 165 | ; Level : |
| 166 | ; * Whatever numeric value the PI assigns. |
| 167 | ; * If the PI's designation is '1.5q', search for : LEVEL=1.5,/QUICKLOOK |
| 168 | ; |
| 169 | ; Quicklook : |
| 170 | ; * Quicklook items are assumed to be generated with a focus on speed rather |
| 171 | ; than scientific accuracy. They are useful for instrument planning and |
| 172 | ; space weather but should not be used for science publication. |
| 173 | ; * This concept is sometimes called 'browse' or 'near real time' (nrt) |
| 174 | ; * Quicklook products are *not* searched by default |
| 175 | ; |
| 176 | ; Resolution / Pixels / Pixel Scale : (currently SDO/AIA and HMI only) |
| 177 | ; * The "resolution" is a function of the highest level of data available. |
| 178 | ; If the CCD is 2048x2048, but it's binned to 512x512 before downlink, |
| 179 | ; the 512x512 product is designated as '1'. If a 2048x2048 and 512x512 |
| 180 | ; product are both available, the 512x512 product is designated '0.25'. |
| 181 | ; * Pixels are (currently) limited to a single dimension. (and only implemented |
| 182 | ; for SDO data) We hope to change this in the future to support TRACE, |
| 183 | ; Hinode and other investigations where this changed between observations |
| 184 | ; * Pixel Scale (PSCALE) is in arc seconds. It's currently only implemented |
| 185 | ; for SDO, which is 0.6 arcsec per pixel at full resolution for AIA. |
| 186 | ; |
| 187 | ;- |
| 188 | }}} |