IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 11, 2007, 3:35:04 PM (19 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.73

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippdb/src/ippdb.h

    r11030 r11045  
    15901590    char            *exp_type;
    15911591    psS32           imfiles;
    1592     psS16           fault;
    15931592} newExpRow;
    15941593
     
    16051604    psTime*         dateobs,
    16061605    const char      *exp_type,
    1607     psS32           imfiles,
    1608     psS16           fault
     1606    psS32           imfiles
    16091607);
    16101608
     
    16421640    psTime*         dateobs,
    16431641    const char      *exp_type,
    1644     psS32           imfiles,
    1645     psS16           fault
     1642    psS32           imfiles
    16461643);
    16471644
     
    18031800    char            *class_id;
    18041801    char            *uri;
    1805     psS16           fault;
    18061802} newImfileRow;
    18071803
     
    18151811    const char      *class,
    18161812    const char      *class_id,
    1817     const char      *uri,
    1818     psS16           fault
     1813    const char      *uri
    18191814);
    18201815
     
    18491844    const char      *class,
    18501845    const char      *class_id,
    1851     const char      *uri,
    1852     psS16           fault
     1846    const char      *uri
    18531847);
    18541848
     
    20001994    bool            mdcf                ///< format as mdconfig or simple
    20011995);
    2002 /** rawDetrendExpRow data structure
    2003  *
    2004  * Structure for representing a single row of rawDetrendExp table data.
     1996/** rawExpRow data structure
     1997 *
     1998 * Structure for representing a single row of rawExp table data.
    20051999 */
    20062000
     
    20252019    char            *object;
    20262020    psTime*         dateobs;
    2027 } rawDetrendExpRow;
    2028 
    2029 /** Creates a new rawDetrendExpRow object
    2030  *
    2031  *  @return A new rawDetrendExpRow object or NULL on failure.
    2032  */
    2033 
    2034 rawDetrendExpRow *rawDetrendExpRowAlloc(
     2021    psS16           fault;
     2022} rawExpRow;
     2023
     2024/** Creates a new rawExpRow object
     2025 *
     2026 *  @return A new rawExpRow object or NULL on failure.
     2027 */
     2028
     2029rawExpRow *rawExpRowAlloc(
    20352030    const char      *exp_tag,
    20362031    const char      *camera,
     
    20512046    psF64           posang,
    20522047    const char      *object,
    2053     psTime*         dateobs
    2054 );
    2055 
    2056 /** Creates a new rawDetrendExp table
    2057  *
    2058  * @return true on success
    2059  */
    2060 
    2061 bool rawDetrendExpCreateTable(
     2048    psTime*         dateobs,
     2049    psS16           fault
     2050);
     2051
     2052/** Creates a new rawExp table
     2053 *
     2054 * @return true on success
     2055 */
     2056
     2057bool rawExpCreateTable(
    20622058    psDB            *dbh                ///< Database handle
    20632059);
    20642060
    2065 /** Deletes a rawDetrendExp table
    2066  *
    2067  * @return true on success
    2068  */
    2069 
    2070 bool rawDetrendExpDropTable(
     2061/** Deletes a rawExp table
     2062 *
     2063 * @return true on success
     2064 */
     2065
     2066bool rawExpDropTable(
    20712067    psDB            *dbh                ///< Database handle
    20722068);
     
    20792075 */
    20802076
    2081 bool rawDetrendExpInsert(
     2077bool rawExpInsert(
    20822078    psDB            *dbh,               ///< Database handle
    20832079    const char      *exp_tag,
     
    20992095    psF64           posang,
    21002096    const char      *object,
    2101     psTime*         dateobs
     2097    psTime*         dateobs,
     2098    psS16           fault
    21022099);
    21032100
     
    21072104 */
    21082105
    2109 long long rawDetrendExpDelete(
     2106long long rawExpDelete(
    21102107    psDB            *dbh,               ///< Database handle
    21112108    const psMetadata *where,            ///< Row match criteria
     
    21132110);
    21142111
    2115 /** Insert a single rawDetrendExpRow object into a table
     2112/** Insert a single rawExpRow object into a table
    21162113 *
    21172114 * This function constructs and inserts a single row based on it's parameters.
     
    21202117 */
    21212118
    2122 bool rawDetrendExpInsertObject(
    2123     psDB            *dbh,               ///< Database handle
    2124     rawDetrendExpRow *object             ///< rawDetrendExpRow object
    2125 );
    2126 
    2127 /** Insert an array of rawDetrendExpRow object into a table
     2119bool rawExpInsertObject(
     2120    psDB            *dbh,               ///< Database handle
     2121    rawExpRow       *object             ///< rawExpRow object
     2122);
     2123
     2124/** Insert an array of rawExpRow object into a table
    21282125 *
    21292126 * This function constructs and inserts multiple rows based on it's parameters.
     
    21322129 */
    21332130
    2134 bool rawDetrendExpInsertObjects(
    2135     psDB            *dbh,               ///< Database handle
    2136     psArray         *objects            ///< array of rawDetrendExpRow objects
    2137 );
    2138 
    2139 /** Insert data from a binary FITS table rawDetrendExpRow into the database
     2131bool rawExpInsertObjects(
     2132    psDB            *dbh,               ///< Database handle
     2133    psArray         *objects            ///< array of rawExpRow objects
     2134);
     2135
     2136/** Insert data from a binary FITS table rawExpRow into the database
    21402137 *
    21412138 * This function expects a psFits object with a FITS table as the first
     
    21472144 */
    21482145
    2149 bool rawDetrendExpInsertFits(
     2146bool rawExpInsertFits(
    21502147    psDB            *dbh,               ///< Database handle
    21512148    const psFits    *fits               ///< psFits object
     
    21622159 */
    21632160
    2164 bool rawDetrendExpSelectRowsFits(
     2161bool rawExpSelectRowsFits(
    21652162    psDB            *dbh,               ///< Database handle
    21662163    psFits          *fits,              ///< psFits object
     
    21692166);
    21702167
    2171 /** Convert a rawDetrendExpRow into an equivalent psMetadata
     2168/** Convert a rawExpRow into an equivalent psMetadata
    21722169 *
    21732170 * @return A psMetadata pointer or NULL on error
    21742171 */
    21752172
    2176 psMetadata *rawDetrendExpMetadataFromObject(
    2177     const rawDetrendExpRow *object             ///< fooRow to convert into a psMetadata
     2173psMetadata *rawExpMetadataFromObject(
     2174    const rawExpRow *object             ///< fooRow to convert into a psMetadata
    21782175);
    21792176
    21802177/** Convert a psMetadata into an equivalent fooRow
    21812178 *
    2182  * @return A rawDetrendExpRow pointer or NULL on error
    2183  */
    2184 
    2185 rawDetrendExpRow *rawDetrendExpObjectFromMetadata(
     2179 * @return A rawExpRow pointer or NULL on error
     2180 */
     2181
     2182rawExpRow *rawExpObjectFromMetadata(
    21862183    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    21872184);
    2188 /** Selects up to limit rows from the database and returns as rawDetrendExpRow objects in a psArray
     2185/** Selects up to limit rows from the database and returns as rawExpRow objects in a psArray
    21892186 *
    21902187 *  See psDBSelectRows() for documentation on the format of where.
     
    21932190 */
    21942191
    2195 psArray *rawDetrendExpSelectRowObjects(
     2192psArray *rawExpSelectRowObjects(
    21962193    psDB            *dbh,               ///< Database handle
    21972194    const psMetadata *where,            ///< Row match criteria
    21982195    unsigned long long limit            ///< Maximum number of elements to return
    21992196);
    2200 /** Deletes a row from the database coresponding to an rawDetrendExp
     2197/** Deletes a row from the database coresponding to an rawExp
    22012198 *
    22022199 *  Note that a 'where' search psMetadata is constructed from each object and
     
    22062203 */
    22072204
    2208 bool rawDetrendExpDeleteObject(
    2209     psDB            *dbh,               ///< Database handle
    2210     const rawDetrendExpRow *object    ///< Object to delete
     2205bool rawExpDeleteObject(
     2206    psDB            *dbh,               ///< Database handle
     2207    const rawExpRow *object    ///< Object to delete
    22112208);
    22122209/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    22182215 */
    22192216
    2220 long long rawDetrendExpDeleteRowObjects(
     2217long long rawExpDeleteRowObjects(
    22212218    psDB            *dbh,               ///< Database handle
    22222219    const psArray   *objects,           ///< Array of objects to delete
    22232220    unsigned long long limit            ///< Maximum number of elements to delete
    22242221);
    2225 /** Formats and prints an array of rawDetrendExpRow objects
     2222/** Formats and prints an array of rawExpRow objects
    22262223 *
    22272224 * When mdcf is set the formated output is in psMetadataConfig
     
    22312228 */
    22322229
    2233 bool rawDetrendExpPrintObjects(
     2230bool rawExpPrintObjects(
    22342231    FILE            *stream,            ///< a stream
    2235     psArray         *objects,           ///< An array of rawDetrendExpRow objects
     2232    psArray         *objects,           ///< An array of rawExpRow objects
    22362233    bool            mdcf                ///< format as mdconfig or simple
    22372234);
    2238 /** Formats and prints an rawDetrendExpRow object
     2235/** Formats and prints an rawExpRow object
    22392236 *
    22402237 * When mdcf is set the formated output is in psMetadataConfig
     
    22442241 */
    22452242
    2246 bool rawDetrendExpPrintObject(
     2243bool rawExpPrintObject(
    22472244    FILE            *stream,            ///< a stream
    2248     rawDetrendExpRow *object,    ///< an rawDetrendExpRow object
    2249     bool            mdcf                ///< format as mdconfig or simple
    2250 );
    2251 /** rawScienceExpRow data structure
    2252  *
    2253  * Structure for representing a single row of rawScienceExp table data.
    2254  */
    2255 
    2256 typedef struct {
    2257     char            *exp_tag;
    2258     char            *camera;
    2259     char            *telescope;
    2260     char            *exp_type;
    2261     psS32           imfiles;
    2262     char            *filter;
    2263     psF32           airmass;
    2264     psF64           ra;
    2265     psF64           decl;
    2266     psF32           exp_time;
    2267     psF64           bg;
    2268     psF64           bg_stdev;
    2269     psF64           bg_mean_stdev;
    2270     psF64           alt;
    2271     psF64           az;
    2272     psF32           ccd_temp;
    2273     psF64           posang;
    2274     char            *object;
    2275     psTime*         dateobs;
    2276 } rawScienceExpRow;
    2277 
    2278 /** Creates a new rawScienceExpRow object
    2279  *
    2280  *  @return A new rawScienceExpRow object or NULL on failure.
    2281  */
    2282 
    2283 rawScienceExpRow *rawScienceExpRowAlloc(
    2284     const char      *exp_tag,
    2285     const char      *camera,
    2286     const char      *telescope,
    2287     const char      *exp_type,
    2288     psS32           imfiles,
    2289     const char      *filter,
    2290     psF32           airmass,
    2291     psF64           ra,
    2292     psF64           decl,
    2293     psF32           exp_time,
    2294     psF64           bg,
    2295     psF64           bg_stdev,
    2296     psF64           bg_mean_stdev,
    2297     psF64           alt,
    2298     psF64           az,
    2299     psF32           ccd_temp,
    2300     psF64           posang,
    2301     const char      *object,
    2302     psTime*         dateobs
    2303 );
    2304 
    2305 /** Creates a new rawScienceExp table
    2306  *
    2307  * @return true on success
    2308  */
    2309 
    2310 bool rawScienceExpCreateTable(
    2311     psDB            *dbh                ///< Database handle
    2312 );
    2313 
    2314 /** Deletes a rawScienceExp table
    2315  *
    2316  * @return true on success
    2317  */
    2318 
    2319 bool rawScienceExpDropTable(
    2320     psDB            *dbh                ///< Database handle
    2321 );
    2322 
    2323 /** Insert a single row into a table
    2324  *
    2325  * This function constructs and inserts a single row based on it's parameters.
    2326  *
    2327  * @return true on success
    2328  */
    2329 
    2330 bool rawScienceExpInsert(
    2331     psDB            *dbh,               ///< Database handle
    2332     const char      *exp_tag,
    2333     const char      *camera,
    2334     const char      *telescope,
    2335     const char      *exp_type,
    2336     psS32           imfiles,
    2337     const char      *filter,
    2338     psF32           airmass,
    2339     psF64           ra,
    2340     psF64           decl,
    2341     psF32           exp_time,
    2342     psF64           bg,
    2343     psF64           bg_stdev,
    2344     psF64           bg_mean_stdev,
    2345     psF64           alt,
    2346     psF64           az,
    2347     psF32           ccd_temp,
    2348     psF64           posang,
    2349     const char      *object,
    2350     psTime*         dateobs
    2351 );
    2352 
    2353 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    2354  *
    2355  * @return A The number of rows removed or a negative value on error
    2356  */
    2357 
    2358 long long rawScienceExpDelete(
    2359     psDB            *dbh,               ///< Database handle
    2360     const psMetadata *where,            ///< Row match criteria
    2361     unsigned long long limit            ///< Maximum number of elements to delete
    2362 );
    2363 
    2364 /** Insert a single rawScienceExpRow object into a table
    2365  *
    2366  * This function constructs and inserts a single row based on it's parameters.
    2367  *
    2368  * @return true on success
    2369  */
    2370 
    2371 bool rawScienceExpInsertObject(
    2372     psDB            *dbh,               ///< Database handle
    2373     rawScienceExpRow *object             ///< rawScienceExpRow object
    2374 );
    2375 
    2376 /** Insert an array of rawScienceExpRow object into a table
    2377  *
    2378  * This function constructs and inserts multiple rows based on it's parameters.
    2379  *
    2380  * @return true on success
    2381  */
    2382 
    2383 bool rawScienceExpInsertObjects(
    2384     psDB            *dbh,               ///< Database handle
    2385     psArray         *objects            ///< array of rawScienceExpRow objects
    2386 );
    2387 
    2388 /** Insert data from a binary FITS table rawScienceExpRow into the database
    2389  *
    2390  * This function expects a psFits object with a FITS table as the first
    2391  * extension.  The table must have at least one row of data in it, that is of
    2392  * the appropriate format (number of columns and their type).  All other
    2393  * extensions are ignored.
    2394  *
    2395  * @return true on success
    2396  */
    2397 
    2398 bool rawScienceExpInsertFits(
    2399     psDB            *dbh,               ///< Database handle
    2400     const psFits    *fits               ///< psFits object
    2401 );
    2402 
    2403 /** Selects up to limit from the database and returns them in a binary FITS table
    2404  *
    2405  * This function assumes an empty psFits object and will create a FITS table
    2406  * as the first extension.
    2407  *
    2408  *  See psDBSelectRows() for documentation on the format of where.
    2409  *
    2410  * @return true on success
    2411  */
    2412 
    2413 bool rawScienceExpSelectRowsFits(
    2414     psDB            *dbh,               ///< Database handle
    2415     psFits          *fits,              ///< psFits object
    2416     const psMetadata *where,            ///< Row match criteria
    2417     unsigned long long limit            ///< Maximum number of elements to return
    2418 );
    2419 
    2420 /** Convert a rawScienceExpRow into an equivalent psMetadata
    2421  *
    2422  * @return A psMetadata pointer or NULL on error
    2423  */
    2424 
    2425 psMetadata *rawScienceExpMetadataFromObject(
    2426     const rawScienceExpRow *object             ///< fooRow to convert into a psMetadata
    2427 );
    2428 
    2429 /** Convert a psMetadata into an equivalent fooRow
    2430  *
    2431  * @return A rawScienceExpRow pointer or NULL on error
    2432  */
    2433 
    2434 rawScienceExpRow *rawScienceExpObjectFromMetadata(
    2435     psMetadata      *md                 ///< psMetadata to convert into a fooRow
    2436 );
    2437 /** Selects up to limit rows from the database and returns as rawScienceExpRow objects in a psArray
    2438  *
    2439  *  See psDBSelectRows() for documentation on the format of where.
    2440  *
    2441  * @return A psArray pointer or NULL on error
    2442  */
    2443 
    2444 psArray *rawScienceExpSelectRowObjects(
    2445     psDB            *dbh,               ///< Database handle
    2446     const psMetadata *where,            ///< Row match criteria
    2447     unsigned long long limit            ///< Maximum number of elements to return
    2448 );
    2449 /** Deletes a row from the database coresponding to an rawScienceExp
    2450  *
    2451  *  Note that a 'where' search psMetadata is constructed from each object and
    2452  *  used to find rows to delete.
    2453  *
    2454  * @return A The number of rows removed or a negative value on error
    2455  */
    2456 
    2457 bool rawScienceExpDeleteObject(
    2458     psDB            *dbh,               ///< Database handle
    2459     const rawScienceExpRow *object    ///< Object to delete
    2460 );
    2461 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    2462  *
    2463  *  Note that a 'where' search psMetadata is constructed from each object and
    2464  *  used to find rows to delete.
    2465  *
    2466  * @return A The number of rows removed or a negative value on error
    2467  */
    2468 
    2469 long long rawScienceExpDeleteRowObjects(
    2470     psDB            *dbh,               ///< Database handle
    2471     const psArray   *objects,           ///< Array of objects to delete
    2472     unsigned long long limit            ///< Maximum number of elements to delete
    2473 );
    2474 /** Formats and prints an array of rawScienceExpRow objects
    2475  *
    2476  * When mdcf is set the formated output is in psMetadataConfig
    2477  * format, otherwise it is in a simple tabular format.
    2478  *
    2479  * @return true on success
    2480  */
    2481 
    2482 bool rawScienceExpPrintObjects(
    2483     FILE            *stream,            ///< a stream
    2484     psArray         *objects,           ///< An array of rawScienceExpRow objects
    2485     bool            mdcf                ///< format as mdconfig or simple
    2486 );
    2487 /** Formats and prints an rawScienceExpRow object
    2488  *
    2489  * When mdcf is set the formated output is in psMetadataConfig
    2490  * format, otherwise it is in a simple tabular format.
    2491  *
    2492  * @return true on success
    2493  */
    2494 
    2495 bool rawScienceExpPrintObject(
    2496     FILE            *stream,            ///< a stream
    2497     rawScienceExpRow *object,    ///< an rawScienceExpRow object
     2245    rawExpRow *object,    ///< an rawExpRow object
    24982246    bool            mdcf                ///< format as mdconfig or simple
    24992247);
     
    25232271    char            *object;
    25242272    psTime*         dateobs;
     2273    psS16           fault;
    25252274} rawImfileRow;
    25262275
     
    25492298    psF64           posang,
    25502299    const char      *object,
    2551     psTime*         dateobs
     2300    psTime*         dateobs,
     2301    psS16           fault
    25522302);
    25532303
     
    25972347    psF64           posang,
    25982348    const char      *object,
    2599     psTime*         dateobs
     2349    psTime*         dateobs,
     2350    psS16           fault
    26002351);
    26012352
Note: See TracChangeset for help on using the changeset viewer.