IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 20, 2006, 2:38:16 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.50

File:
1 edited

Legend:

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

    r9423 r9684  
    125125);
    126126
    127 /** weatherRow data structure
    128  *
    129  * Structure for representing a single row of weather table data.
    130  */
    131 
    132 typedef struct {
    133     psF32           temp01;
    134     psF32           humi01;
    135     psF32           temp02;
    136     psF32           humi02;
    137     psF32           temp03;
    138     psF32           humi03;
    139     psF32           pressure;
    140 } weatherRow;
    141 
    142 /** Creates a new weatherRow object
    143  *
    144  *  @return A new weatherRow object or NULL on failure.
    145  */
    146 
    147 weatherRow *weatherRowAlloc(
    148     psF32           temp01,
    149     psF32           humi01,
    150     psF32           temp02,
    151     psF32           humi02,
    152     psF32           temp03,
    153     psF32           humi03,
    154     psF32           pressure
    155 );
    156 
    157 /** Creates a new weather table
    158  *
    159  * @return true on success
    160  */
    161 
    162 bool weatherCreateTable(
    163     psDB            *dbh                ///< Database handle
    164 );
    165 
    166 /** Deletes a weather table
    167  *
    168  * @return true on success
    169  */
    170 
    171 bool weatherDropTable(
    172     psDB            *dbh                ///< Database handle
    173 );
    174 
    175 /** Insert a single row into a table
    176  *
    177  * This function constructs and inserts a single row based on it's parameters.
    178  *
    179  * @return true on success
    180  */
    181 
    182 bool weatherInsert(
    183     psDB            *dbh,               ///< Database handle
    184     psF32           temp01,
    185     psF32           humi01,
    186     psF32           temp02,
    187     psF32           humi02,
    188     psF32           temp03,
    189     psF32           humi03,
    190     psF32           pressure
    191 );
    192 
    193 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    194  *
    195  * @return A The number of rows removed or a negative value on error
    196  */
    197 
    198 long long weatherDelete(
    199     psDB            *dbh,               ///< Database handle
    200     const psMetadata *where,            ///< Row match criteria
    201     unsigned long long limit            ///< Maximum number of elements to delete
    202 );
    203 
    204 /** Insert a single weatherRow object into a table
    205  *
    206  * This function constructs and inserts a single row based on it's parameters.
    207  *
    208  * @return true on success
    209  */
    210 
    211 bool weatherInsertObject(
    212     psDB            *dbh,               ///< Database handle
    213     weatherRow      *object             ///< weatherRow object
    214 );
    215 
    216 /** Insert an array of weatherRow object into a table
    217  *
    218  * This function constructs and inserts multiple rows based on it's parameters.
    219  *
    220  * @return true on success
    221  */
    222 
    223 bool weatherInsertObjects(
    224     psDB            *dbh,               ///< Database handle
    225     psArray         *objects            ///< array of weatherRow objects
    226 );
    227 
    228 /** Insert data from a binary FITS table weatherRow into the database
    229  *
    230  * This function expects a psFits object with a FITS table as the first
    231  * extension.  The table must have at least one row of data in it, that is of
    232  * the appropriate format (number of columns and their type).  All other
    233  * extensions are ignored.
    234  *
    235  * @return true on success
    236  */
    237 
    238 bool weatherInsertFits(
    239     psDB            *dbh,               ///< Database handle
    240     const psFits    *fits               ///< psFits object
    241 );
    242 
    243 /** Selects up to limit from the database and returns them in a binary FITS table
    244  *
    245  * This function assumes an empty psFits object and will create a FITS table
    246  * as the first extension.
    247  *
    248  *  See psDBSelectRows() for documentation on the format of where.
    249  *
    250  * @return true on success
    251  */
    252 
    253 bool weatherSelectRowsFits(
    254     psDB            *dbh,               ///< Database handle
    255     psFits          *fits,              ///< psFits object
    256     const psMetadata *where,            ///< Row match criteria
    257     unsigned long long limit            ///< Maximum number of elements to return
    258 );
    259 
    260 /** Convert a weatherRow into an equivalent psMetadata
    261  *
    262  * @return A psMetadata pointer or NULL on error
    263  */
    264 
    265 psMetadata *weatherMetadataFromObject(
    266     const weatherRow *object             ///< fooRow to convert into a psMetadata
    267 );
    268 
    269 /** Convert a psMetadata into an equivalent fooRow
    270  *
    271  * @return A weatherRow pointer or NULL on error
    272  */
    273 
    274 weatherRow *weatherObjectFromMetadata(
    275     psMetadata      *md                 ///< psMetadata to convert into a fooRow
    276 );
    277 /** Selects up to limit rows from the database and returns as weatherRow objects in a psArray
    278  *
    279  *  See psDBSelectRows() for documentation on the format of where.
    280  *
    281  * @return A psArray pointer or NULL on error
    282  */
    283 
    284 psArray *weatherSelectRowObjects(
    285     psDB            *dbh,               ///< Database handle
    286     const psMetadata *where,            ///< Row match criteria
    287     unsigned long long limit            ///< Maximum number of elements to return
    288 );
    289 /** Deletes a row from the database coresponding to an weather
    290  *
    291  *  Note that a 'where' search psMetadata is constructed from each object and
    292  *  used to find rows to delete.
    293  *
    294  * @return A The number of rows removed or a negative value on error
    295  */
    296 
    297 bool weatherDeleteObject(
    298     psDB            *dbh,               ///< Database handle
    299     const weatherRow *object    ///< Object to delete
    300 );
    301 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    302  *
    303  *  Note that a 'where' search psMetadata is constructed from each object and
    304  *  used to find rows to delete.
    305  *
    306  * @return A The number of rows removed or a negative value on error
    307  */
    308 
    309 long long weatherDeleteRowObjects(
    310     psDB            *dbh,               ///< Database handle
    311     const psArray   *objects,           ///< Array of objects to delete
    312     unsigned long long limit            ///< Maximum number of elements to delete
    313 );
    314 /** Formats and prints an array of weatherRow objects
    315  *
    316  * When mdcf is set the formated output is in psMetadataConfig
    317  * format, otherwise it is in a simple tabular format.
    318  *
    319  * @return true on success
    320  */
    321 
    322 bool weatherPrintObjects(
    323     FILE            *stream,            ///< a stream
    324     psArray         *objects,           ///< An array of weatherRow objects
    325     bool            mdcf                ///< format as mdconfig or simple
    326 );
    327 /** skyp_transparencyRow data structure
    328  *
    329  * Structure for representing a single row of skyp_transparency table data.
    330  */
    331 
    332 typedef struct {
    333     char            *filter;
    334     psF64           trans;
    335     psS32           nstars;
    336     psF64           ra;
    337     psF64           decl;
    338     psF32           exptime;
    339     psF64           sky_bright;
    340 } skyp_transparencyRow;
    341 
    342 /** Creates a new skyp_transparencyRow object
    343  *
    344  *  @return A new skyp_transparencyRow object or NULL on failure.
    345  */
    346 
    347 skyp_transparencyRow *skyp_transparencyRowAlloc(
    348     const char      *filter,
    349     psF64           trans,
    350     psS32           nstars,
    351     psF64           ra,
    352     psF64           decl,
    353     psF32           exptime,
    354     psF64           sky_bright
    355 );
    356 
    357 /** Creates a new skyp_transparency table
    358  *
    359  * @return true on success
    360  */
    361 
    362 bool skyp_transparencyCreateTable(
    363     psDB            *dbh                ///< Database handle
    364 );
    365 
    366 /** Deletes a skyp_transparency table
    367  *
    368  * @return true on success
    369  */
    370 
    371 bool skyp_transparencyDropTable(
    372     psDB            *dbh                ///< Database handle
    373 );
    374 
    375 /** Insert a single row into a table
    376  *
    377  * This function constructs and inserts a single row based on it's parameters.
    378  *
    379  * @return true on success
    380  */
    381 
    382 bool skyp_transparencyInsert(
    383     psDB            *dbh,               ///< Database handle
    384     const char      *filter,
    385     psF64           trans,
    386     psS32           nstars,
    387     psF64           ra,
    388     psF64           decl,
    389     psF32           exptime,
    390     psF64           sky_bright
    391 );
    392 
    393 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    394  *
    395  * @return A The number of rows removed or a negative value on error
    396  */
    397 
    398 long long skyp_transparencyDelete(
    399     psDB            *dbh,               ///< Database handle
    400     const psMetadata *where,            ///< Row match criteria
    401     unsigned long long limit            ///< Maximum number of elements to delete
    402 );
    403 
    404 /** Insert a single skyp_transparencyRow object into a table
    405  *
    406  * This function constructs and inserts a single row based on it's parameters.
    407  *
    408  * @return true on success
    409  */
    410 
    411 bool skyp_transparencyInsertObject(
    412     psDB            *dbh,               ///< Database handle
    413     skyp_transparencyRow *object             ///< skyp_transparencyRow object
    414 );
    415 
    416 /** Insert an array of skyp_transparencyRow object into a table
    417  *
    418  * This function constructs and inserts multiple rows based on it's parameters.
    419  *
    420  * @return true on success
    421  */
    422 
    423 bool skyp_transparencyInsertObjects(
    424     psDB            *dbh,               ///< Database handle
    425     psArray         *objects            ///< array of skyp_transparencyRow objects
    426 );
    427 
    428 /** Insert data from a binary FITS table skyp_transparencyRow into the database
    429  *
    430  * This function expects a psFits object with a FITS table as the first
    431  * extension.  The table must have at least one row of data in it, that is of
    432  * the appropriate format (number of columns and their type).  All other
    433  * extensions are ignored.
    434  *
    435  * @return true on success
    436  */
    437 
    438 bool skyp_transparencyInsertFits(
    439     psDB            *dbh,               ///< Database handle
    440     const psFits    *fits               ///< psFits object
    441 );
    442 
    443 /** Selects up to limit from the database and returns them in a binary FITS table
    444  *
    445  * This function assumes an empty psFits object and will create a FITS table
    446  * as the first extension.
    447  *
    448  *  See psDBSelectRows() for documentation on the format of where.
    449  *
    450  * @return true on success
    451  */
    452 
    453 bool skyp_transparencySelectRowsFits(
    454     psDB            *dbh,               ///< Database handle
    455     psFits          *fits,              ///< psFits object
    456     const psMetadata *where,            ///< Row match criteria
    457     unsigned long long limit            ///< Maximum number of elements to return
    458 );
    459 
    460 /** Convert a skyp_transparencyRow into an equivalent psMetadata
    461  *
    462  * @return A psMetadata pointer or NULL on error
    463  */
    464 
    465 psMetadata *skyp_transparencyMetadataFromObject(
    466     const skyp_transparencyRow *object             ///< fooRow to convert into a psMetadata
    467 );
    468 
    469 /** Convert a psMetadata into an equivalent fooRow
    470  *
    471  * @return A skyp_transparencyRow pointer or NULL on error
    472  */
    473 
    474 skyp_transparencyRow *skyp_transparencyObjectFromMetadata(
    475     psMetadata      *md                 ///< psMetadata to convert into a fooRow
    476 );
    477 /** Selects up to limit rows from the database and returns as skyp_transparencyRow objects in a psArray
    478  *
    479  *  See psDBSelectRows() for documentation on the format of where.
    480  *
    481  * @return A psArray pointer or NULL on error
    482  */
    483 
    484 psArray *skyp_transparencySelectRowObjects(
    485     psDB            *dbh,               ///< Database handle
    486     const psMetadata *where,            ///< Row match criteria
    487     unsigned long long limit            ///< Maximum number of elements to return
    488 );
    489 /** Deletes a row from the database coresponding to an skyp_transparency
    490  *
    491  *  Note that a 'where' search psMetadata is constructed from each object and
    492  *  used to find rows to delete.
    493  *
    494  * @return A The number of rows removed or a negative value on error
    495  */
    496 
    497 bool skyp_transparencyDeleteObject(
    498     psDB            *dbh,               ///< Database handle
    499     const skyp_transparencyRow *object    ///< Object to delete
    500 );
    501 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    502  *
    503  *  Note that a 'where' search psMetadata is constructed from each object and
    504  *  used to find rows to delete.
    505  *
    506  * @return A The number of rows removed or a negative value on error
    507  */
    508 
    509 long long skyp_transparencyDeleteRowObjects(
    510     psDB            *dbh,               ///< Database handle
    511     const psArray   *objects,           ///< Array of objects to delete
    512     unsigned long long limit            ///< Maximum number of elements to delete
    513 );
    514 /** Formats and prints an array of skyp_transparencyRow objects
    515  *
    516  * When mdcf is set the formated output is in psMetadataConfig
    517  * format, otherwise it is in a simple tabular format.
    518  *
    519  * @return true on success
    520  */
    521 
    522 bool skyp_transparencyPrintObjects(
    523     FILE            *stream,            ///< a stream
    524     psArray         *objects,           ///< An array of skyp_transparencyRow objects
    525     bool            mdcf                ///< format as mdconfig or simple
    526 );
    527 /** skyp_absorptionRow data structure
    528  *
    529  * Structure for representing a single row of skyp_absorption table data.
    530  */
    531 
    532 typedef struct {
    533     char            *disperser_id;
    534     psF32           atmcomp1;
    535     psF32           atmcomp2;
    536     psF32           atmcomp3;
    537     psS32           nstars;
    538     psF64           ra;
    539     psF64           decl;
    540     psF32           exptime;
    541     psF64           sky_bright;
    542 } skyp_absorptionRow;
    543 
    544 /** Creates a new skyp_absorptionRow object
    545  *
    546  *  @return A new skyp_absorptionRow object or NULL on failure.
    547  */
    548 
    549 skyp_absorptionRow *skyp_absorptionRowAlloc(
    550     const char      *disperser_id,
    551     psF32           atmcomp1,
    552     psF32           atmcomp2,
    553     psF32           atmcomp3,
    554     psS32           nstars,
    555     psF64           ra,
    556     psF64           decl,
    557     psF32           exptime,
    558     psF64           sky_bright
    559 );
    560 
    561 /** Creates a new skyp_absorption table
    562  *
    563  * @return true on success
    564  */
    565 
    566 bool skyp_absorptionCreateTable(
    567     psDB            *dbh                ///< Database handle
    568 );
    569 
    570 /** Deletes a skyp_absorption table
    571  *
    572  * @return true on success
    573  */
    574 
    575 bool skyp_absorptionDropTable(
    576     psDB            *dbh                ///< Database handle
    577 );
    578 
    579 /** Insert a single row into a table
    580  *
    581  * This function constructs and inserts a single row based on it's parameters.
    582  *
    583  * @return true on success
    584  */
    585 
    586 bool skyp_absorptionInsert(
    587     psDB            *dbh,               ///< Database handle
    588     const char      *disperser_id,
    589     psF32           atmcomp1,
    590     psF32           atmcomp2,
    591     psF32           atmcomp3,
    592     psS32           nstars,
    593     psF64           ra,
    594     psF64           decl,
    595     psF32           exptime,
    596     psF64           sky_bright
    597 );
    598 
    599 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    600  *
    601  * @return A The number of rows removed or a negative value on error
    602  */
    603 
    604 long long skyp_absorptionDelete(
    605     psDB            *dbh,               ///< Database handle
    606     const psMetadata *where,            ///< Row match criteria
    607     unsigned long long limit            ///< Maximum number of elements to delete
    608 );
    609 
    610 /** Insert a single skyp_absorptionRow object into a table
    611  *
    612  * This function constructs and inserts a single row based on it's parameters.
    613  *
    614  * @return true on success
    615  */
    616 
    617 bool skyp_absorptionInsertObject(
    618     psDB            *dbh,               ///< Database handle
    619     skyp_absorptionRow *object             ///< skyp_absorptionRow object
    620 );
    621 
    622 /** Insert an array of skyp_absorptionRow object into a table
    623  *
    624  * This function constructs and inserts multiple rows based on it's parameters.
    625  *
    626  * @return true on success
    627  */
    628 
    629 bool skyp_absorptionInsertObjects(
    630     psDB            *dbh,               ///< Database handle
    631     psArray         *objects            ///< array of skyp_absorptionRow objects
    632 );
    633 
    634 /** Insert data from a binary FITS table skyp_absorptionRow into the database
    635  *
    636  * This function expects a psFits object with a FITS table as the first
    637  * extension.  The table must have at least one row of data in it, that is of
    638  * the appropriate format (number of columns and their type).  All other
    639  * extensions are ignored.
    640  *
    641  * @return true on success
    642  */
    643 
    644 bool skyp_absorptionInsertFits(
    645     psDB            *dbh,               ///< Database handle
    646     const psFits    *fits               ///< psFits object
    647 );
    648 
    649 /** Selects up to limit from the database and returns them in a binary FITS table
    650  *
    651  * This function assumes an empty psFits object and will create a FITS table
    652  * as the first extension.
    653  *
    654  *  See psDBSelectRows() for documentation on the format of where.
    655  *
    656  * @return true on success
    657  */
    658 
    659 bool skyp_absorptionSelectRowsFits(
    660     psDB            *dbh,               ///< Database handle
    661     psFits          *fits,              ///< psFits object
    662     const psMetadata *where,            ///< Row match criteria
    663     unsigned long long limit            ///< Maximum number of elements to return
    664 );
    665 
    666 /** Convert a skyp_absorptionRow into an equivalent psMetadata
    667  *
    668  * @return A psMetadata pointer or NULL on error
    669  */
    670 
    671 psMetadata *skyp_absorptionMetadataFromObject(
    672     const skyp_absorptionRow *object             ///< fooRow to convert into a psMetadata
    673 );
    674 
    675 /** Convert a psMetadata into an equivalent fooRow
    676  *
    677  * @return A skyp_absorptionRow pointer or NULL on error
    678  */
    679 
    680 skyp_absorptionRow *skyp_absorptionObjectFromMetadata(
    681     psMetadata      *md                 ///< psMetadata to convert into a fooRow
    682 );
    683 /** Selects up to limit rows from the database and returns as skyp_absorptionRow objects in a psArray
    684  *
    685  *  See psDBSelectRows() for documentation on the format of where.
    686  *
    687  * @return A psArray pointer or NULL on error
    688  */
    689 
    690 psArray *skyp_absorptionSelectRowObjects(
    691     psDB            *dbh,               ///< Database handle
    692     const psMetadata *where,            ///< Row match criteria
    693     unsigned long long limit            ///< Maximum number of elements to return
    694 );
    695 /** Deletes a row from the database coresponding to an skyp_absorption
    696  *
    697  *  Note that a 'where' search psMetadata is constructed from each object and
    698  *  used to find rows to delete.
    699  *
    700  * @return A The number of rows removed or a negative value on error
    701  */
    702 
    703 bool skyp_absorptionDeleteObject(
    704     psDB            *dbh,               ///< Database handle
    705     const skyp_absorptionRow *object    ///< Object to delete
    706 );
    707 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    708  *
    709  *  Note that a 'where' search psMetadata is constructed from each object and
    710  *  used to find rows to delete.
    711  *
    712  * @return A The number of rows removed or a negative value on error
    713  */
    714 
    715 long long skyp_absorptionDeleteRowObjects(
    716     psDB            *dbh,               ///< Database handle
    717     const psArray   *objects,           ///< Array of objects to delete
    718     unsigned long long limit            ///< Maximum number of elements to delete
    719 );
    720 /** Formats and prints an array of skyp_absorptionRow objects
    721  *
    722  * When mdcf is set the formated output is in psMetadataConfig
    723  * format, otherwise it is in a simple tabular format.
    724  *
    725  * @return true on success
    726  */
    727 
    728 bool skyp_absorptionPrintObjects(
    729     FILE            *stream,            ///< a stream
    730     psArray         *objects,           ///< An array of skyp_absorptionRow objects
    731     bool            mdcf                ///< format as mdconfig or simple
    732 );
    733 /** skyp_emissionRow data structure
    734  *
    735  * Structure for representing a single row of skyp_emission table data.
    736  */
    737 
    738 typedef struct {
    739     char            *disperser_id;
    740     psF32           atmcomp1;
    741     psF32           atmcomp2;
    742     psF32           atmcomp3;
    743     psF32           continuum;
    744     psF32           exptime;
    745 } skyp_emissionRow;
    746 
    747 /** Creates a new skyp_emissionRow object
    748  *
    749  *  @return A new skyp_emissionRow object or NULL on failure.
    750  */
    751 
    752 skyp_emissionRow *skyp_emissionRowAlloc(
    753     const char      *disperser_id,
    754     psF32           atmcomp1,
    755     psF32           atmcomp2,
    756     psF32           atmcomp3,
    757     psF32           continuum,
    758     psF32           exptime
    759 );
    760 
    761 /** Creates a new skyp_emission table
    762  *
    763  * @return true on success
    764  */
    765 
    766 bool skyp_emissionCreateTable(
    767     psDB            *dbh                ///< Database handle
    768 );
    769 
    770 /** Deletes a skyp_emission table
    771  *
    772  * @return true on success
    773  */
    774 
    775 bool skyp_emissionDropTable(
    776     psDB            *dbh                ///< Database handle
    777 );
    778 
    779 /** Insert a single row into a table
    780  *
    781  * This function constructs and inserts a single row based on it's parameters.
    782  *
    783  * @return true on success
    784  */
    785 
    786 bool skyp_emissionInsert(
    787     psDB            *dbh,               ///< Database handle
    788     const char      *disperser_id,
    789     psF32           atmcomp1,
    790     psF32           atmcomp2,
    791     psF32           atmcomp3,
    792     psF32           continuum,
    793     psF32           exptime
    794 );
    795 
    796 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    797  *
    798  * @return A The number of rows removed or a negative value on error
    799  */
    800 
    801 long long skyp_emissionDelete(
    802     psDB            *dbh,               ///< Database handle
    803     const psMetadata *where,            ///< Row match criteria
    804     unsigned long long limit            ///< Maximum number of elements to delete
    805 );
    806 
    807 /** Insert a single skyp_emissionRow object into a table
    808  *
    809  * This function constructs and inserts a single row based on it's parameters.
    810  *
    811  * @return true on success
    812  */
    813 
    814 bool skyp_emissionInsertObject(
    815     psDB            *dbh,               ///< Database handle
    816     skyp_emissionRow *object             ///< skyp_emissionRow object
    817 );
    818 
    819 /** Insert an array of skyp_emissionRow object into a table
    820  *
    821  * This function constructs and inserts multiple rows based on it's parameters.
    822  *
    823  * @return true on success
    824  */
    825 
    826 bool skyp_emissionInsertObjects(
    827     psDB            *dbh,               ///< Database handle
    828     psArray         *objects            ///< array of skyp_emissionRow objects
    829 );
    830 
    831 /** Insert data from a binary FITS table skyp_emissionRow into the database
    832  *
    833  * This function expects a psFits object with a FITS table as the first
    834  * extension.  The table must have at least one row of data in it, that is of
    835  * the appropriate format (number of columns and their type).  All other
    836  * extensions are ignored.
    837  *
    838  * @return true on success
    839  */
    840 
    841 bool skyp_emissionInsertFits(
    842     psDB            *dbh,               ///< Database handle
    843     const psFits    *fits               ///< psFits object
    844 );
    845 
    846 /** Selects up to limit from the database and returns them in a binary FITS table
    847  *
    848  * This function assumes an empty psFits object and will create a FITS table
    849  * as the first extension.
    850  *
    851  *  See psDBSelectRows() for documentation on the format of where.
    852  *
    853  * @return true on success
    854  */
    855 
    856 bool skyp_emissionSelectRowsFits(
    857     psDB            *dbh,               ///< Database handle
    858     psFits          *fits,              ///< psFits object
    859     const psMetadata *where,            ///< Row match criteria
    860     unsigned long long limit            ///< Maximum number of elements to return
    861 );
    862 
    863 /** Convert a skyp_emissionRow into an equivalent psMetadata
    864  *
    865  * @return A psMetadata pointer or NULL on error
    866  */
    867 
    868 psMetadata *skyp_emissionMetadataFromObject(
    869     const skyp_emissionRow *object             ///< fooRow to convert into a psMetadata
    870 );
    871 
    872 /** Convert a psMetadata into an equivalent fooRow
    873  *
    874  * @return A skyp_emissionRow pointer or NULL on error
    875  */
    876 
    877 skyp_emissionRow *skyp_emissionObjectFromMetadata(
    878     psMetadata      *md                 ///< psMetadata to convert into a fooRow
    879 );
    880 /** Selects up to limit rows from the database and returns as skyp_emissionRow objects in a psArray
    881  *
    882  *  See psDBSelectRows() for documentation on the format of where.
    883  *
    884  * @return A psArray pointer or NULL on error
    885  */
    886 
    887 psArray *skyp_emissionSelectRowObjects(
    888     psDB            *dbh,               ///< Database handle
    889     const psMetadata *where,            ///< Row match criteria
    890     unsigned long long limit            ///< Maximum number of elements to return
    891 );
    892 /** Deletes a row from the database coresponding to an skyp_emission
    893  *
    894  *  Note that a 'where' search psMetadata is constructed from each object and
    895  *  used to find rows to delete.
    896  *
    897  * @return A The number of rows removed or a negative value on error
    898  */
    899 
    900 bool skyp_emissionDeleteObject(
    901     psDB            *dbh,               ///< Database handle
    902     const skyp_emissionRow *object    ///< Object to delete
    903 );
    904 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    905  *
    906  *  Note that a 'where' search psMetadata is constructed from each object and
    907  *  used to find rows to delete.
    908  *
    909  * @return A The number of rows removed or a negative value on error
    910  */
    911 
    912 long long skyp_emissionDeleteRowObjects(
    913     psDB            *dbh,               ///< Database handle
    914     const psArray   *objects,           ///< Array of objects to delete
    915     unsigned long long limit            ///< Maximum number of elements to delete
    916 );
    917 /** Formats and prints an array of skyp_emissionRow objects
    918  *
    919  * When mdcf is set the formated output is in psMetadataConfig
    920  * format, otherwise it is in a simple tabular format.
    921  *
    922  * @return true on success
    923  */
    924 
    925 bool skyp_emissionPrintObjects(
    926     FILE            *stream,            ///< a stream
    927     psArray         *objects,           ///< An array of skyp_emissionRow objects
    928     bool            mdcf                ///< format as mdconfig or simple
    929 );
    930 /** dimmRow data structure
    931  *
    932  * Structure for representing a single row of dimm table data.
    933  */
    934 
    935 typedef struct {
    936     psF32           sigmax;
    937     psF32           sigmay;
    938     psF32           fwhm;
    939     psF64           ra;
    940     psF64           decl;
    941     psF32           expttime;
    942     char            *telescope_id;
    943 } dimmRow;
    944 
    945 /** Creates a new dimmRow object
    946  *
    947  *  @return A new dimmRow object or NULL on failure.
    948  */
    949 
    950 dimmRow *dimmRowAlloc(
    951     psF32           sigmax,
    952     psF32           sigmay,
    953     psF32           fwhm,
    954     psF64           ra,
    955     psF64           decl,
    956     psF32           expttime,
    957     const char      *telescope_id
    958 );
    959 
    960 /** Creates a new dimm table
    961  *
    962  * @return true on success
    963  */
    964 
    965 bool dimmCreateTable(
    966     psDB            *dbh                ///< Database handle
    967 );
    968 
    969 /** Deletes a dimm table
    970  *
    971  * @return true on success
    972  */
    973 
    974 bool dimmDropTable(
    975     psDB            *dbh                ///< Database handle
    976 );
    977 
    978 /** Insert a single row into a table
    979  *
    980  * This function constructs and inserts a single row based on it's parameters.
    981  *
    982  * @return true on success
    983  */
    984 
    985 bool dimmInsert(
    986     psDB            *dbh,               ///< Database handle
    987     psF32           sigmax,
    988     psF32           sigmay,
    989     psF32           fwhm,
    990     psF64           ra,
    991     psF64           decl,
    992     psF32           expttime,
    993     const char      *telescope_id
    994 );
    995 
    996 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    997  *
    998  * @return A The number of rows removed or a negative value on error
    999  */
    1000 
    1001 long long dimmDelete(
    1002     psDB            *dbh,               ///< Database handle
    1003     const psMetadata *where,            ///< Row match criteria
    1004     unsigned long long limit            ///< Maximum number of elements to delete
    1005 );
    1006 
    1007 /** Insert a single dimmRow object into a table
    1008  *
    1009  * This function constructs and inserts a single row based on it's parameters.
    1010  *
    1011  * @return true on success
    1012  */
    1013 
    1014 bool dimmInsertObject(
    1015     psDB            *dbh,               ///< Database handle
    1016     dimmRow         *object             ///< dimmRow object
    1017 );
    1018 
    1019 /** Insert an array of dimmRow object into a table
    1020  *
    1021  * This function constructs and inserts multiple rows based on it's parameters.
    1022  *
    1023  * @return true on success
    1024  */
    1025 
    1026 bool dimmInsertObjects(
    1027     psDB            *dbh,               ///< Database handle
    1028     psArray         *objects            ///< array of dimmRow objects
    1029 );
    1030 
    1031 /** Insert data from a binary FITS table dimmRow into the database
    1032  *
    1033  * This function expects a psFits object with a FITS table as the first
    1034  * extension.  The table must have at least one row of data in it, that is of
    1035  * the appropriate format (number of columns and their type).  All other
    1036  * extensions are ignored.
    1037  *
    1038  * @return true on success
    1039  */
    1040 
    1041 bool dimmInsertFits(
    1042     psDB            *dbh,               ///< Database handle
    1043     const psFits    *fits               ///< psFits object
    1044 );
    1045 
    1046 /** Selects up to limit from the database and returns them in a binary FITS table
    1047  *
    1048  * This function assumes an empty psFits object and will create a FITS table
    1049  * as the first extension.
    1050  *
    1051  *  See psDBSelectRows() for documentation on the format of where.
    1052  *
    1053  * @return true on success
    1054  */
    1055 
    1056 bool dimmSelectRowsFits(
    1057     psDB            *dbh,               ///< Database handle
    1058     psFits          *fits,              ///< psFits object
    1059     const psMetadata *where,            ///< Row match criteria
    1060     unsigned long long limit            ///< Maximum number of elements to return
    1061 );
    1062 
    1063 /** Convert a dimmRow into an equivalent psMetadata
    1064  *
    1065  * @return A psMetadata pointer or NULL on error
    1066  */
    1067 
    1068 psMetadata *dimmMetadataFromObject(
    1069     const dimmRow   *object             ///< fooRow to convert into a psMetadata
    1070 );
    1071 
    1072 /** Convert a psMetadata into an equivalent fooRow
    1073  *
    1074  * @return A dimmRow pointer or NULL on error
    1075  */
    1076 
    1077 dimmRow *dimmObjectFromMetadata(
    1078     psMetadata      *md                 ///< psMetadata to convert into a fooRow
    1079 );
    1080 /** Selects up to limit rows from the database and returns as dimmRow objects in a psArray
    1081  *
    1082  *  See psDBSelectRows() for documentation on the format of where.
    1083  *
    1084  * @return A psArray pointer or NULL on error
    1085  */
    1086 
    1087 psArray *dimmSelectRowObjects(
    1088     psDB            *dbh,               ///< Database handle
    1089     const psMetadata *where,            ///< Row match criteria
    1090     unsigned long long limit            ///< Maximum number of elements to return
    1091 );
    1092 /** Deletes a row from the database coresponding to an dimm
    1093  *
    1094  *  Note that a 'where' search psMetadata is constructed from each object and
    1095  *  used to find rows to delete.
    1096  *
    1097  * @return A The number of rows removed or a negative value on error
    1098  */
    1099 
    1100 bool dimmDeleteObject(
    1101     psDB            *dbh,               ///< Database handle
    1102     const dimmRow *object    ///< Object to delete
    1103 );
    1104 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    1105  *
    1106  *  Note that a 'where' search psMetadata is constructed from each object and
    1107  *  used to find rows to delete.
    1108  *
    1109  * @return A The number of rows removed or a negative value on error
    1110  */
    1111 
    1112 long long dimmDeleteRowObjects(
    1113     psDB            *dbh,               ///< Database handle
    1114     const psArray   *objects,           ///< Array of objects to delete
    1115     unsigned long long limit            ///< Maximum number of elements to delete
    1116 );
    1117 /** Formats and prints an array of dimmRow objects
    1118  *
    1119  * When mdcf is set the formated output is in psMetadataConfig
    1120  * format, otherwise it is in a simple tabular format.
    1121  *
    1122  * @return true on success
    1123  */
    1124 
    1125 bool dimmPrintObjects(
    1126     FILE            *stream,            ///< a stream
    1127     psArray         *objects,           ///< An array of dimmRow objects
    1128     bool            mdcf                ///< format as mdconfig or simple
    1129 );
    1130 /** skyp_irRow data structure
    1131  *
    1132  * Structure for representing a single row of skyp_ir table data.
    1133  */
    1134 
    1135 typedef struct {
    1136     psF64           sky_bright;
    1137     psF64           sky_var;
    1138     psF64           ra;
    1139     psF64           decl;
    1140     psF32           fov_x;
    1141     psF32           fov_y;
    1142 } skyp_irRow;
    1143 
    1144 /** Creates a new skyp_irRow object
    1145  *
    1146  *  @return A new skyp_irRow object or NULL on failure.
    1147  */
    1148 
    1149 skyp_irRow *skyp_irRowAlloc(
    1150     psF64           sky_bright,
    1151     psF64           sky_var,
    1152     psF64           ra,
    1153     psF64           decl,
    1154     psF32           fov_x,
    1155     psF32           fov_y
    1156 );
    1157 
    1158 /** Creates a new skyp_ir table
    1159  *
    1160  * @return true on success
    1161  */
    1162 
    1163 bool skyp_irCreateTable(
    1164     psDB            *dbh                ///< Database handle
    1165 );
    1166 
    1167 /** Deletes a skyp_ir table
    1168  *
    1169  * @return true on success
    1170  */
    1171 
    1172 bool skyp_irDropTable(
    1173     psDB            *dbh                ///< Database handle
    1174 );
    1175 
    1176 /** Insert a single row into a table
    1177  *
    1178  * This function constructs and inserts a single row based on it's parameters.
    1179  *
    1180  * @return true on success
    1181  */
    1182 
    1183 bool skyp_irInsert(
    1184     psDB            *dbh,               ///< Database handle
    1185     psF64           sky_bright,
    1186     psF64           sky_var,
    1187     psF64           ra,
    1188     psF64           decl,
    1189     psF32           fov_x,
    1190     psF32           fov_y
    1191 );
    1192 
    1193 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    1194  *
    1195  * @return A The number of rows removed or a negative value on error
    1196  */
    1197 
    1198 long long skyp_irDelete(
    1199     psDB            *dbh,               ///< Database handle
    1200     const psMetadata *where,            ///< Row match criteria
    1201     unsigned long long limit            ///< Maximum number of elements to delete
    1202 );
    1203 
    1204 /** Insert a single skyp_irRow object into a table
    1205  *
    1206  * This function constructs and inserts a single row based on it's parameters.
    1207  *
    1208  * @return true on success
    1209  */
    1210 
    1211 bool skyp_irInsertObject(
    1212     psDB            *dbh,               ///< Database handle
    1213     skyp_irRow      *object             ///< skyp_irRow object
    1214 );
    1215 
    1216 /** Insert an array of skyp_irRow object into a table
    1217  *
    1218  * This function constructs and inserts multiple rows based on it's parameters.
    1219  *
    1220  * @return true on success
    1221  */
    1222 
    1223 bool skyp_irInsertObjects(
    1224     psDB            *dbh,               ///< Database handle
    1225     psArray         *objects            ///< array of skyp_irRow objects
    1226 );
    1227 
    1228 /** Insert data from a binary FITS table skyp_irRow into the database
    1229  *
    1230  * This function expects a psFits object with a FITS table as the first
    1231  * extension.  The table must have at least one row of data in it, that is of
    1232  * the appropriate format (number of columns and their type).  All other
    1233  * extensions are ignored.
    1234  *
    1235  * @return true on success
    1236  */
    1237 
    1238 bool skyp_irInsertFits(
    1239     psDB            *dbh,               ///< Database handle
    1240     const psFits    *fits               ///< psFits object
    1241 );
    1242 
    1243 /** Selects up to limit from the database and returns them in a binary FITS table
    1244  *
    1245  * This function assumes an empty psFits object and will create a FITS table
    1246  * as the first extension.
    1247  *
    1248  *  See psDBSelectRows() for documentation on the format of where.
    1249  *
    1250  * @return true on success
    1251  */
    1252 
    1253 bool skyp_irSelectRowsFits(
    1254     psDB            *dbh,               ///< Database handle
    1255     psFits          *fits,              ///< psFits object
    1256     const psMetadata *where,            ///< Row match criteria
    1257     unsigned long long limit            ///< Maximum number of elements to return
    1258 );
    1259 
    1260 /** Convert a skyp_irRow into an equivalent psMetadata
    1261  *
    1262  * @return A psMetadata pointer or NULL on error
    1263  */
    1264 
    1265 psMetadata *skyp_irMetadataFromObject(
    1266     const skyp_irRow *object             ///< fooRow to convert into a psMetadata
    1267 );
    1268 
    1269 /** Convert a psMetadata into an equivalent fooRow
    1270  *
    1271  * @return A skyp_irRow pointer or NULL on error
    1272  */
    1273 
    1274 skyp_irRow *skyp_irObjectFromMetadata(
    1275     psMetadata      *md                 ///< psMetadata to convert into a fooRow
    1276 );
    1277 /** Selects up to limit rows from the database and returns as skyp_irRow objects in a psArray
    1278  *
    1279  *  See psDBSelectRows() for documentation on the format of where.
    1280  *
    1281  * @return A psArray pointer or NULL on error
    1282  */
    1283 
    1284 psArray *skyp_irSelectRowObjects(
    1285     psDB            *dbh,               ///< Database handle
    1286     const psMetadata *where,            ///< Row match criteria
    1287     unsigned long long limit            ///< Maximum number of elements to return
    1288 );
    1289 /** Deletes a row from the database coresponding to an skyp_ir
    1290  *
    1291  *  Note that a 'where' search psMetadata is constructed from each object and
    1292  *  used to find rows to delete.
    1293  *
    1294  * @return A The number of rows removed or a negative value on error
    1295  */
    1296 
    1297 bool skyp_irDeleteObject(
    1298     psDB            *dbh,               ///< Database handle
    1299     const skyp_irRow *object    ///< Object to delete
    1300 );
    1301 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    1302  *
    1303  *  Note that a 'where' search psMetadata is constructed from each object and
    1304  *  used to find rows to delete.
    1305  *
    1306  * @return A The number of rows removed or a negative value on error
    1307  */
    1308 
    1309 long long skyp_irDeleteRowObjects(
    1310     psDB            *dbh,               ///< Database handle
    1311     const psArray   *objects,           ///< Array of objects to delete
    1312     unsigned long long limit            ///< Maximum number of elements to delete
    1313 );
    1314 /** Formats and prints an array of skyp_irRow objects
    1315  *
    1316  * When mdcf is set the formated output is in psMetadataConfig
    1317  * format, otherwise it is in a simple tabular format.
    1318  *
    1319  * @return true on success
    1320  */
    1321 
    1322 bool skyp_irPrintObjects(
    1323     FILE            *stream,            ///< a stream
    1324     psArray         *objects,           ///< An array of skyp_irRow objects
    1325     bool            mdcf                ///< format as mdconfig or simple
    1326 );
    1327 /** domeRow data structure
    1328  *
    1329  * Structure for representing a single row of dome table data.
    1330  */
    1331 
    1332 typedef struct {
    1333     psF32           az;
    1334     bool            open;
    1335     bool            light;
    1336     bool            track;
    1337 } domeRow;
    1338 
    1339 /** Creates a new domeRow object
    1340  *
    1341  *  @return A new domeRow object or NULL on failure.
    1342  */
    1343 
    1344 domeRow *domeRowAlloc(
    1345     psF32           az,
    1346     bool            open,
    1347     bool            light,
    1348     bool            track
    1349 );
    1350 
    1351 /** Creates a new dome table
    1352  *
    1353  * @return true on success
    1354  */
    1355 
    1356 bool domeCreateTable(
    1357     psDB            *dbh                ///< Database handle
    1358 );
    1359 
    1360 /** Deletes a dome table
    1361  *
    1362  * @return true on success
    1363  */
    1364 
    1365 bool domeDropTable(
    1366     psDB            *dbh                ///< Database handle
    1367 );
    1368 
    1369 /** Insert a single row into a table
    1370  *
    1371  * This function constructs and inserts a single row based on it's parameters.
    1372  *
    1373  * @return true on success
    1374  */
    1375 
    1376 bool domeInsert(
    1377     psDB            *dbh,               ///< Database handle
    1378     psF32           az,
    1379     bool            open,
    1380     bool            light,
    1381     bool            track
    1382 );
    1383 
    1384 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    1385  *
    1386  * @return A The number of rows removed or a negative value on error
    1387  */
    1388 
    1389 long long domeDelete(
    1390     psDB            *dbh,               ///< Database handle
    1391     const psMetadata *where,            ///< Row match criteria
    1392     unsigned long long limit            ///< Maximum number of elements to delete
    1393 );
    1394 
    1395 /** Insert a single domeRow object into a table
    1396  *
    1397  * This function constructs and inserts a single row based on it's parameters.
    1398  *
    1399  * @return true on success
    1400  */
    1401 
    1402 bool domeInsertObject(
    1403     psDB            *dbh,               ///< Database handle
    1404     domeRow         *object             ///< domeRow object
    1405 );
    1406 
    1407 /** Insert an array of domeRow object into a table
    1408  *
    1409  * This function constructs and inserts multiple rows based on it's parameters.
    1410  *
    1411  * @return true on success
    1412  */
    1413 
    1414 bool domeInsertObjects(
    1415     psDB            *dbh,               ///< Database handle
    1416     psArray         *objects            ///< array of domeRow objects
    1417 );
    1418 
    1419 /** Insert data from a binary FITS table domeRow into the database
    1420  *
    1421  * This function expects a psFits object with a FITS table as the first
    1422  * extension.  The table must have at least one row of data in it, that is of
    1423  * the appropriate format (number of columns and their type).  All other
    1424  * extensions are ignored.
    1425  *
    1426  * @return true on success
    1427  */
    1428 
    1429 bool domeInsertFits(
    1430     psDB            *dbh,               ///< Database handle
    1431     const psFits    *fits               ///< psFits object
    1432 );
    1433 
    1434 /** Selects up to limit from the database and returns them in a binary FITS table
    1435  *
    1436  * This function assumes an empty psFits object and will create a FITS table
    1437  * as the first extension.
    1438  *
    1439  *  See psDBSelectRows() for documentation on the format of where.
    1440  *
    1441  * @return true on success
    1442  */
    1443 
    1444 bool domeSelectRowsFits(
    1445     psDB            *dbh,               ///< Database handle
    1446     psFits          *fits,              ///< psFits object
    1447     const psMetadata *where,            ///< Row match criteria
    1448     unsigned long long limit            ///< Maximum number of elements to return
    1449 );
    1450 
    1451 /** Convert a domeRow into an equivalent psMetadata
    1452  *
    1453  * @return A psMetadata pointer or NULL on error
    1454  */
    1455 
    1456 psMetadata *domeMetadataFromObject(
    1457     const domeRow   *object             ///< fooRow to convert into a psMetadata
    1458 );
    1459 
    1460 /** Convert a psMetadata into an equivalent fooRow
    1461  *
    1462  * @return A domeRow pointer or NULL on error
    1463  */
    1464 
    1465 domeRow *domeObjectFromMetadata(
    1466     psMetadata      *md                 ///< psMetadata to convert into a fooRow
    1467 );
    1468 /** Selects up to limit rows from the database and returns as domeRow objects in a psArray
    1469  *
    1470  *  See psDBSelectRows() for documentation on the format of where.
    1471  *
    1472  * @return A psArray pointer or NULL on error
    1473  */
    1474 
    1475 psArray *domeSelectRowObjects(
    1476     psDB            *dbh,               ///< Database handle
    1477     const psMetadata *where,            ///< Row match criteria
    1478     unsigned long long limit            ///< Maximum number of elements to return
    1479 );
    1480 /** Deletes a row from the database coresponding to an dome
    1481  *
    1482  *  Note that a 'where' search psMetadata is constructed from each object and
    1483  *  used to find rows to delete.
    1484  *
    1485  * @return A The number of rows removed or a negative value on error
    1486  */
    1487 
    1488 bool domeDeleteObject(
    1489     psDB            *dbh,               ///< Database handle
    1490     const domeRow *object    ///< Object to delete
    1491 );
    1492 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    1493  *
    1494  *  Note that a 'where' search psMetadata is constructed from each object and
    1495  *  used to find rows to delete.
    1496  *
    1497  * @return A The number of rows removed or a negative value on error
    1498  */
    1499 
    1500 long long domeDeleteRowObjects(
    1501     psDB            *dbh,               ///< Database handle
    1502     const psArray   *objects,           ///< Array of objects to delete
    1503     unsigned long long limit            ///< Maximum number of elements to delete
    1504 );
    1505 /** Formats and prints an array of domeRow objects
    1506  *
    1507  * When mdcf is set the formated output is in psMetadataConfig
    1508  * format, otherwise it is in a simple tabular format.
    1509  *
    1510  * @return true on success
    1511  */
    1512 
    1513 bool domePrintObjects(
    1514     FILE            *stream,            ///< a stream
    1515     psArray         *objects,           ///< An array of domeRow objects
    1516     bool            mdcf                ///< format as mdconfig or simple
    1517 );
    1518 /** telescopeRow data structure
    1519  *
    1520  * Structure for representing a single row of telescope table data.
    1521  */
    1522 
    1523 typedef struct {
    1524     char            *guide;
    1525     psF32           alt;
    1526     psF32           az;
    1527     psF64           ra;
    1528     psF64           decl;
    1529 } telescopeRow;
    1530 
    1531 /** Creates a new telescopeRow object
    1532  *
    1533  *  @return A new telescopeRow object or NULL on failure.
    1534  */
    1535 
    1536 telescopeRow *telescopeRowAlloc(
    1537     const char      *guide,
    1538     psF32           alt,
    1539     psF32           az,
    1540     psF64           ra,
    1541     psF64           decl
    1542 );
    1543 
    1544 /** Creates a new telescope table
    1545  *
    1546  * @return true on success
    1547  */
    1548 
    1549 bool telescopeCreateTable(
    1550     psDB            *dbh                ///< Database handle
    1551 );
    1552 
    1553 /** Deletes a telescope table
    1554  *
    1555  * @return true on success
    1556  */
    1557 
    1558 bool telescopeDropTable(
    1559     psDB            *dbh                ///< Database handle
    1560 );
    1561 
    1562 /** Insert a single row into a table
    1563  *
    1564  * This function constructs and inserts a single row based on it's parameters.
    1565  *
    1566  * @return true on success
    1567  */
    1568 
    1569 bool telescopeInsert(
    1570     psDB            *dbh,               ///< Database handle
    1571     const char      *guide,
    1572     psF32           alt,
    1573     psF32           az,
    1574     psF64           ra,
    1575     psF64           decl
    1576 );
    1577 
    1578 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    1579  *
    1580  * @return A The number of rows removed or a negative value on error
    1581  */
    1582 
    1583 long long telescopeDelete(
    1584     psDB            *dbh,               ///< Database handle
    1585     const psMetadata *where,            ///< Row match criteria
    1586     unsigned long long limit            ///< Maximum number of elements to delete
    1587 );
    1588 
    1589 /** Insert a single telescopeRow object into a table
    1590  *
    1591  * This function constructs and inserts a single row based on it's parameters.
    1592  *
    1593  * @return true on success
    1594  */
    1595 
    1596 bool telescopeInsertObject(
    1597     psDB            *dbh,               ///< Database handle
    1598     telescopeRow    *object             ///< telescopeRow object
    1599 );
    1600 
    1601 /** Insert an array of telescopeRow object into a table
    1602  *
    1603  * This function constructs and inserts multiple rows based on it's parameters.
    1604  *
    1605  * @return true on success
    1606  */
    1607 
    1608 bool telescopeInsertObjects(
    1609     psDB            *dbh,               ///< Database handle
    1610     psArray         *objects            ///< array of telescopeRow objects
    1611 );
    1612 
    1613 /** Insert data from a binary FITS table telescopeRow into the database
    1614  *
    1615  * This function expects a psFits object with a FITS table as the first
    1616  * extension.  The table must have at least one row of data in it, that is of
    1617  * the appropriate format (number of columns and their type).  All other
    1618  * extensions are ignored.
    1619  *
    1620  * @return true on success
    1621  */
    1622 
    1623 bool telescopeInsertFits(
    1624     psDB            *dbh,               ///< Database handle
    1625     const psFits    *fits               ///< psFits object
    1626 );
    1627 
    1628 /** Selects up to limit from the database and returns them in a binary FITS table
    1629  *
    1630  * This function assumes an empty psFits object and will create a FITS table
    1631  * as the first extension.
    1632  *
    1633  *  See psDBSelectRows() for documentation on the format of where.
    1634  *
    1635  * @return true on success
    1636  */
    1637 
    1638 bool telescopeSelectRowsFits(
    1639     psDB            *dbh,               ///< Database handle
    1640     psFits          *fits,              ///< psFits object
    1641     const psMetadata *where,            ///< Row match criteria
    1642     unsigned long long limit            ///< Maximum number of elements to return
    1643 );
    1644 
    1645 /** Convert a telescopeRow into an equivalent psMetadata
    1646  *
    1647  * @return A psMetadata pointer or NULL on error
    1648  */
    1649 
    1650 psMetadata *telescopeMetadataFromObject(
    1651     const telescopeRow *object             ///< fooRow to convert into a psMetadata
    1652 );
    1653 
    1654 /** Convert a psMetadata into an equivalent fooRow
    1655  *
    1656  * @return A telescopeRow pointer or NULL on error
    1657  */
    1658 
    1659 telescopeRow *telescopeObjectFromMetadata(
    1660     psMetadata      *md                 ///< psMetadata to convert into a fooRow
    1661 );
    1662 /** Selects up to limit rows from the database and returns as telescopeRow objects in a psArray
    1663  *
    1664  *  See psDBSelectRows() for documentation on the format of where.
    1665  *
    1666  * @return A psArray pointer or NULL on error
    1667  */
    1668 
    1669 psArray *telescopeSelectRowObjects(
    1670     psDB            *dbh,               ///< Database handle
    1671     const psMetadata *where,            ///< Row match criteria
    1672     unsigned long long limit            ///< Maximum number of elements to return
    1673 );
    1674 /** Deletes a row from the database coresponding to an telescope
    1675  *
    1676  *  Note that a 'where' search psMetadata is constructed from each object and
    1677  *  used to find rows to delete.
    1678  *
    1679  * @return A The number of rows removed or a negative value on error
    1680  */
    1681 
    1682 bool telescopeDeleteObject(
    1683     psDB            *dbh,               ///< Database handle
    1684     const telescopeRow *object    ///< Object to delete
    1685 );
    1686 /** Deletes up to limit rows from the database and returns the number of rows actually deleted.
    1687  *
    1688  *  Note that a 'where' search psMetadata is constructed from each object and
    1689  *  used to find rows to delete.
    1690  *
    1691  * @return A The number of rows removed or a negative value on error
    1692  */
    1693 
    1694 long long telescopeDeleteRowObjects(
    1695     psDB            *dbh,               ///< Database handle
    1696     const psArray   *objects,           ///< Array of objects to delete
    1697     unsigned long long limit            ///< Maximum number of elements to delete
    1698 );
    1699 /** Formats and prints an array of telescopeRow objects
    1700  *
    1701  * When mdcf is set the formated output is in psMetadataConfig
    1702  * format, otherwise it is in a simple tabular format.
    1703  *
    1704  * @return true on success
    1705  */
    1706 
    1707 bool telescopePrintObjects(
    1708     FILE            *stream,            ///< a stream
    1709     psArray         *objects,           ///< An array of telescopeRow objects
    1710     bool            mdcf                ///< format as mdconfig or simple
    1711 );
    1712127/** summitExpRow data structure
    1713128 *
     
    27131128    psF64           posang;
    27141129    char            *object;
     1130    psTime*         dateobs;
    27151131} rawDetrendExpRow;
    27161132
     
    27381154    psF32           ccd_temp,
    27391155    psF64           posang,
    2740     const char      *object
     1156    const char      *object,
     1157    psTime*         dateobs
    27411158);
    27421159
     
    27851202    psF32           ccd_temp,
    27861203    psF64           posang,
    2787     const char      *object
     1204    const char      *object,
     1205    psTime*         dateobs
    27881206);
    27891207
     
    29461364    psF64           posang;
    29471365    char            *object;
     1366    psTime*         dateobs;
    29481367} rawScienceExpRow;
    29491368
     
    29711390    psF32           ccd_temp,
    29721391    psF64           posang,
    2973     const char      *object
     1392    const char      *object,
     1393    psTime*         dateobs
    29741394);
    29751395
     
    30181438    psF32           ccd_temp,
    30191439    psF64           posang,
    3020     const char      *object
     1440    const char      *object,
     1441    psTime*         dateobs
    30211442);
    30221443
     
    31791600    psF64           posang;
    31801601    char            *object;
     1602    psTime*         dateobs;
    31811603} rawImfileRow;
    31821604
     
    32041626    psF32           ccd_temp,
    32051627    psF64           posang,
    3206     const char      *object
     1628    const char      *object,
     1629    psTime*         dateobs
    32071630);
    32081631
     
    32511674    psF32           ccd_temp,
    32521675    psF64           posang,
    3253     const char      *object
     1676    const char      *object,
     1677    psTime*         dateobs
    32541678);
    32551679
Note: See TracChangeset for help on using the changeset viewer.