IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 23, 2007, 4:28:07 PM (19 years ago)
Author:
jhoblitt
Message:

VERSION 1.1.11

File:
1 edited

Legend:

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

    r11988 r12026  
    25042504    bool            mdcf                ///< format as mdconfig or simple
    25052505);
    2506 /** p1PendingExpRow data structure
    2507  *
    2508  * Structure for representing a single row of p1PendingExp table data.
     2506/** guidePendingExpRow data structure
     2507 *
     2508 * Structure for representing a single row of guidePendingExp table data.
    25092509 */
    25102510
    25112511typedef struct {
    25122512    char            *exp_tag;
    2513     psS32           p1_version;
     2513    psS32           guide_version;
    25142514    char            *recipe;
    2515 } p1PendingExpRow;
    2516 
    2517 /** Creates a new p1PendingExpRow object
    2518  *
    2519  *  @return A new p1PendingExpRow object or NULL on failure.
    2520  */
    2521 
    2522 p1PendingExpRow *p1PendingExpRowAlloc(
     2515} guidePendingExpRow;
     2516
     2517/** Creates a new guidePendingExpRow object
     2518 *
     2519 *  @return A new guidePendingExpRow object or NULL on failure.
     2520 */
     2521
     2522guidePendingExpRow *guidePendingExpRowAlloc(
    25232523    const char      *exp_tag,
    2524     psS32           p1_version,
     2524    psS32           guide_version,
    25252525    const char      *recipe
    25262526);
    25272527
    2528 /** Creates a new p1PendingExp table
    2529  *
    2530  * @return true on success
    2531  */
    2532 
    2533 bool p1PendingExpCreateTable(
     2528/** Creates a new guidePendingExp table
     2529 *
     2530 * @return true on success
     2531 */
     2532
     2533bool guidePendingExpCreateTable(
    25342534    psDB            *dbh                ///< Database handle
    25352535);
    25362536
    2537 /** Deletes a p1PendingExp table
    2538  *
    2539  * @return true on success
    2540  */
    2541 
    2542 bool p1PendingExpDropTable(
     2537/** Deletes a guidePendingExp table
     2538 *
     2539 * @return true on success
     2540 */
     2541
     2542bool guidePendingExpDropTable(
    25432543    psDB            *dbh                ///< Database handle
    25442544);
     
    25512551 */
    25522552
    2553 bool p1PendingExpInsert(
     2553bool guidePendingExpInsert(
    25542554    psDB            *dbh,               ///< Database handle
    25552555    const char      *exp_tag,
    2556     psS32           p1_version,
     2556    psS32           guide_version,
    25572557    const char      *recipe
    25582558);
     
    25632563 */
    25642564
    2565 long long p1PendingExpDelete(
     2565long long guidePendingExpDelete(
    25662566    psDB            *dbh,               ///< Database handle
    25672567    const psMetadata *where,            ///< Row match criteria
     
    25692569);
    25702570
    2571 /** Insert a single p1PendingExpRow object into a table
     2571/** Insert a single guidePendingExpRow object into a table
    25722572 *
    25732573 * This function constructs and inserts a single row based on it's parameters.
     
    25762576 */
    25772577
    2578 bool p1PendingExpInsertObject(
    2579     psDB            *dbh,               ///< Database handle
    2580     p1PendingExpRow *object             ///< p1PendingExpRow object
    2581 );
    2582 
    2583 /** Insert an array of p1PendingExpRow object into a table
     2578bool guidePendingExpInsertObject(
     2579    psDB            *dbh,               ///< Database handle
     2580    guidePendingExpRow *object             ///< guidePendingExpRow object
     2581);
     2582
     2583/** Insert an array of guidePendingExpRow object into a table
    25842584 *
    25852585 * This function constructs and inserts multiple rows based on it's parameters.
     
    25882588 */
    25892589
    2590 bool p1PendingExpInsertObjects(
    2591     psDB            *dbh,               ///< Database handle
    2592     psArray         *objects            ///< array of p1PendingExpRow objects
    2593 );
    2594 
    2595 /** Insert data from a binary FITS table p1PendingExpRow into the database
     2590bool guidePendingExpInsertObjects(
     2591    psDB            *dbh,               ///< Database handle
     2592    psArray         *objects            ///< array of guidePendingExpRow objects
     2593);
     2594
     2595/** Insert data from a binary FITS table guidePendingExpRow into the database
    25962596 *
    25972597 * This function expects a psFits object with a FITS table as the first
     
    26032603 */
    26042604
    2605 bool p1PendingExpInsertFits(
     2605bool guidePendingExpInsertFits(
    26062606    psDB            *dbh,               ///< Database handle
    26072607    const psFits    *fits               ///< psFits object
     
    26182618 */
    26192619
    2620 bool p1PendingExpSelectRowsFits(
     2620bool guidePendingExpSelectRowsFits(
    26212621    psDB            *dbh,               ///< Database handle
    26222622    psFits          *fits,              ///< psFits object
     
    26252625);
    26262626
    2627 /** Convert a p1PendingExpRow into an equivalent psMetadata
     2627/** Convert a guidePendingExpRow into an equivalent psMetadata
    26282628 *
    26292629 * @return A psMetadata pointer or NULL on error
    26302630 */
    26312631
    2632 psMetadata *p1PendingExpMetadataFromObject(
    2633     const p1PendingExpRow *object             ///< fooRow to convert into a psMetadata
     2632psMetadata *guidePendingExpMetadataFromObject(
     2633    const guidePendingExpRow *object             ///< fooRow to convert into a psMetadata
    26342634);
    26352635
    26362636/** Convert a psMetadata into an equivalent fooRow
    26372637 *
    2638  * @return A p1PendingExpRow pointer or NULL on error
    2639  */
    2640 
    2641 p1PendingExpRow *p1PendingExpObjectFromMetadata(
     2638 * @return A guidePendingExpRow pointer or NULL on error
     2639 */
     2640
     2641guidePendingExpRow *guidePendingExpObjectFromMetadata(
    26422642    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    26432643);
    2644 /** Selects up to limit rows from the database and returns as p1PendingExpRow objects in a psArray
     2644/** Selects up to limit rows from the database and returns as guidePendingExpRow objects in a psArray
    26452645 *
    26462646 *  See psDBSelectRows() for documentation on the format of where.
     
    26492649 */
    26502650
    2651 psArray *p1PendingExpSelectRowObjects(
     2651psArray *guidePendingExpSelectRowObjects(
    26522652    psDB            *dbh,               ///< Database handle
    26532653    const psMetadata *where,            ///< Row match criteria
    26542654    unsigned long long limit            ///< Maximum number of elements to return
    26552655);
    2656 /** Deletes a row from the database coresponding to an p1PendingExp
     2656/** Deletes a row from the database coresponding to an guidePendingExp
    26572657 *
    26582658 *  Note that a 'where' search psMetadata is constructed from each object and
     
    26622662 */
    26632663
    2664 bool p1PendingExpDeleteObject(
    2665     psDB            *dbh,               ///< Database handle
    2666     const p1PendingExpRow *object    ///< Object to delete
     2664bool guidePendingExpDeleteObject(
     2665    psDB            *dbh,               ///< Database handle
     2666    const guidePendingExpRow *object    ///< Object to delete
    26672667);
    26682668/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    26742674 */
    26752675
    2676 long long p1PendingExpDeleteRowObjects(
     2676long long guidePendingExpDeleteRowObjects(
    26772677    psDB            *dbh,               ///< Database handle
    26782678    const psArray   *objects,           ///< Array of objects to delete
    26792679    unsigned long long limit            ///< Maximum number of elements to delete
    26802680);
    2681 /** Formats and prints an array of p1PendingExpRow objects
     2681/** Formats and prints an array of guidePendingExpRow objects
    26822682 *
    26832683 * When mdcf is set the formated output is in psMetadataConfig
     
    26872687 */
    26882688
    2689 bool p1PendingExpPrintObjects(
     2689bool guidePendingExpPrintObjects(
    26902690    FILE            *stream,            ///< a stream
    2691     psArray         *objects,           ///< An array of p1PendingExpRow objects
     2691    psArray         *objects,           ///< An array of guidePendingExpRow objects
    26922692    bool            mdcf                ///< format as mdconfig or simple
    26932693);
    2694 /** Formats and prints an p1PendingExpRow object
     2694/** Formats and prints an guidePendingExpRow object
    26952695 *
    26962696 * When mdcf is set the formated output is in psMetadataConfig
     
    27002700 */
    27012701
    2702 bool p1PendingExpPrintObject(
     2702bool guidePendingExpPrintObject(
    27032703    FILE            *stream,            ///< a stream
    2704     p1PendingExpRow *object,    ///< an p1PendingExpRow object
     2704    guidePendingExpRow *object,    ///< an guidePendingExpRow object
    27052705    bool            mdcf                ///< format as mdconfig or simple
    27062706);
    2707 /** p2PendingExpRow data structure
    2708  *
    2709  * Structure for representing a single row of p2PendingExp table data.
     2707/** chipPendingExpRow data structure
     2708 *
     2709 * Structure for representing a single row of chipPendingExp table data.
    27102710 */
    27112711
    27122712typedef struct {
    27132713    char            *exp_tag;
    2714     psS32           p2_version;
    2715     psS32           p1_version;
     2714    psS32           chip_version;
     2715    psS32           guide_version;
    27162716    char            *label;
    27172717    char            *recipe;
    27182718    char            *expgroup;
    27192719    char            *dvodb;
    2720 } p2PendingExpRow;
    2721 
    2722 /** Creates a new p2PendingExpRow object
    2723  *
    2724  *  @return A new p2PendingExpRow object or NULL on failure.
    2725  */
    2726 
    2727 p2PendingExpRow *p2PendingExpRowAlloc(
     2720} chipPendingExpRow;
     2721
     2722/** Creates a new chipPendingExpRow object
     2723 *
     2724 *  @return A new chipPendingExpRow object or NULL on failure.
     2725 */
     2726
     2727chipPendingExpRow *chipPendingExpRowAlloc(
    27282728    const char      *exp_tag,
    2729     psS32           p2_version,
    2730     psS32           p1_version,
     2729    psS32           chip_version,
     2730    psS32           guide_version,
    27312731    const char      *label,
    27322732    const char      *recipe,
     
    27352735);
    27362736
    2737 /** Creates a new p2PendingExp table
    2738  *
    2739  * @return true on success
    2740  */
    2741 
    2742 bool p2PendingExpCreateTable(
     2737/** Creates a new chipPendingExp table
     2738 *
     2739 * @return true on success
     2740 */
     2741
     2742bool chipPendingExpCreateTable(
    27432743    psDB            *dbh                ///< Database handle
    27442744);
    27452745
    2746 /** Deletes a p2PendingExp table
    2747  *
    2748  * @return true on success
    2749  */
    2750 
    2751 bool p2PendingExpDropTable(
     2746/** Deletes a chipPendingExp table
     2747 *
     2748 * @return true on success
     2749 */
     2750
     2751bool chipPendingExpDropTable(
    27522752    psDB            *dbh                ///< Database handle
    27532753);
     
    27602760 */
    27612761
    2762 bool p2PendingExpInsert(
     2762bool chipPendingExpInsert(
    27632763    psDB            *dbh,               ///< Database handle
    27642764    const char      *exp_tag,
    2765     psS32           p2_version,
    2766     psS32           p1_version,
     2765    psS32           chip_version,
     2766    psS32           guide_version,
    27672767    const char      *label,
    27682768    const char      *recipe,
     
    27762776 */
    27772777
    2778 long long p2PendingExpDelete(
     2778long long chipPendingExpDelete(
    27792779    psDB            *dbh,               ///< Database handle
    27802780    const psMetadata *where,            ///< Row match criteria
     
    27822782);
    27832783
    2784 /** Insert a single p2PendingExpRow object into a table
     2784/** Insert a single chipPendingExpRow object into a table
    27852785 *
    27862786 * This function constructs and inserts a single row based on it's parameters.
     
    27892789 */
    27902790
    2791 bool p2PendingExpInsertObject(
    2792     psDB            *dbh,               ///< Database handle
    2793     p2PendingExpRow *object             ///< p2PendingExpRow object
    2794 );
    2795 
    2796 /** Insert an array of p2PendingExpRow object into a table
     2791bool chipPendingExpInsertObject(
     2792    psDB            *dbh,               ///< Database handle
     2793    chipPendingExpRow *object             ///< chipPendingExpRow object
     2794);
     2795
     2796/** Insert an array of chipPendingExpRow object into a table
    27972797 *
    27982798 * This function constructs and inserts multiple rows based on it's parameters.
     
    28012801 */
    28022802
    2803 bool p2PendingExpInsertObjects(
    2804     psDB            *dbh,               ///< Database handle
    2805     psArray         *objects            ///< array of p2PendingExpRow objects
    2806 );
    2807 
    2808 /** Insert data from a binary FITS table p2PendingExpRow into the database
     2803bool chipPendingExpInsertObjects(
     2804    psDB            *dbh,               ///< Database handle
     2805    psArray         *objects            ///< array of chipPendingExpRow objects
     2806);
     2807
     2808/** Insert data from a binary FITS table chipPendingExpRow into the database
    28092809 *
    28102810 * This function expects a psFits object with a FITS table as the first
     
    28162816 */
    28172817
    2818 bool p2PendingExpInsertFits(
     2818bool chipPendingExpInsertFits(
    28192819    psDB            *dbh,               ///< Database handle
    28202820    const psFits    *fits               ///< psFits object
     
    28312831 */
    28322832
    2833 bool p2PendingExpSelectRowsFits(
     2833bool chipPendingExpSelectRowsFits(
    28342834    psDB            *dbh,               ///< Database handle
    28352835    psFits          *fits,              ///< psFits object
     
    28382838);
    28392839
    2840 /** Convert a p2PendingExpRow into an equivalent psMetadata
     2840/** Convert a chipPendingExpRow into an equivalent psMetadata
    28412841 *
    28422842 * @return A psMetadata pointer or NULL on error
    28432843 */
    28442844
    2845 psMetadata *p2PendingExpMetadataFromObject(
    2846     const p2PendingExpRow *object             ///< fooRow to convert into a psMetadata
     2845psMetadata *chipPendingExpMetadataFromObject(
     2846    const chipPendingExpRow *object             ///< fooRow to convert into a psMetadata
    28472847);
    28482848
    28492849/** Convert a psMetadata into an equivalent fooRow
    28502850 *
    2851  * @return A p2PendingExpRow pointer or NULL on error
    2852  */
    2853 
    2854 p2PendingExpRow *p2PendingExpObjectFromMetadata(
     2851 * @return A chipPendingExpRow pointer or NULL on error
     2852 */
     2853
     2854chipPendingExpRow *chipPendingExpObjectFromMetadata(
    28552855    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    28562856);
    2857 /** Selects up to limit rows from the database and returns as p2PendingExpRow objects in a psArray
     2857/** Selects up to limit rows from the database and returns as chipPendingExpRow objects in a psArray
    28582858 *
    28592859 *  See psDBSelectRows() for documentation on the format of where.
     
    28622862 */
    28632863
    2864 psArray *p2PendingExpSelectRowObjects(
     2864psArray *chipPendingExpSelectRowObjects(
    28652865    psDB            *dbh,               ///< Database handle
    28662866    const psMetadata *where,            ///< Row match criteria
    28672867    unsigned long long limit            ///< Maximum number of elements to return
    28682868);
    2869 /** Deletes a row from the database coresponding to an p2PendingExp
     2869/** Deletes a row from the database coresponding to an chipPendingExp
    28702870 *
    28712871 *  Note that a 'where' search psMetadata is constructed from each object and
     
    28752875 */
    28762876
    2877 bool p2PendingExpDeleteObject(
    2878     psDB            *dbh,               ///< Database handle
    2879     const p2PendingExpRow *object    ///< Object to delete
     2877bool chipPendingExpDeleteObject(
     2878    psDB            *dbh,               ///< Database handle
     2879    const chipPendingExpRow *object    ///< Object to delete
    28802880);
    28812881/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    28872887 */
    28882888
    2889 long long p2PendingExpDeleteRowObjects(
     2889long long chipPendingExpDeleteRowObjects(
    28902890    psDB            *dbh,               ///< Database handle
    28912891    const psArray   *objects,           ///< Array of objects to delete
    28922892    unsigned long long limit            ///< Maximum number of elements to delete
    28932893);
    2894 /** Formats and prints an array of p2PendingExpRow objects
     2894/** Formats and prints an array of chipPendingExpRow objects
    28952895 *
    28962896 * When mdcf is set the formated output is in psMetadataConfig
     
    29002900 */
    29012901
    2902 bool p2PendingExpPrintObjects(
     2902bool chipPendingExpPrintObjects(
    29032903    FILE            *stream,            ///< a stream
    2904     psArray         *objects,           ///< An array of p2PendingExpRow objects
     2904    psArray         *objects,           ///< An array of chipPendingExpRow objects
    29052905    bool            mdcf                ///< format as mdconfig or simple
    29062906);
    2907 /** Formats and prints an p2PendingExpRow object
     2907/** Formats and prints an chipPendingExpRow object
    29082908 *
    29092909 * When mdcf is set the formated output is in psMetadataConfig
     
    29132913 */
    29142914
    2915 bool p2PendingExpPrintObject(
     2915bool chipPendingExpPrintObject(
    29162916    FILE            *stream,            ///< a stream
    2917     p2PendingExpRow *object,    ///< an p2PendingExpRow object
     2917    chipPendingExpRow *object,    ///< an chipPendingExpRow object
    29182918    bool            mdcf                ///< format as mdconfig or simple
    29192919);
    2920 /** p2PendingImfileRow data structure
    2921  *
    2922  * Structure for representing a single row of p2PendingImfile table data.
     2920/** chipPendingImfileRow data structure
     2921 *
     2922 * Structure for representing a single row of chipPendingImfile table data.
    29232923 */
    29242924
    29252925typedef struct {
    29262926    char            *exp_tag;
    2927     psS32           p2_version;
    2928     psS32           p1_version;
     2927    psS32           chip_version;
     2928    psS32           guide_version;
    29292929    char            *class_id;
    29302930    char            *recipe;
    29312931    char            *uri;
    2932 } p2PendingImfileRow;
    2933 
    2934 /** Creates a new p2PendingImfileRow object
    2935  *
    2936  *  @return A new p2PendingImfileRow object or NULL on failure.
    2937  */
    2938 
    2939 p2PendingImfileRow *p2PendingImfileRowAlloc(
     2932} chipPendingImfileRow;
     2933
     2934/** Creates a new chipPendingImfileRow object
     2935 *
     2936 *  @return A new chipPendingImfileRow object or NULL on failure.
     2937 */
     2938
     2939chipPendingImfileRow *chipPendingImfileRowAlloc(
    29402940    const char      *exp_tag,
    2941     psS32           p2_version,
    2942     psS32           p1_version,
     2941    psS32           chip_version,
     2942    psS32           guide_version,
    29432943    const char      *class_id,
    29442944    const char      *recipe,
     
    29462946);
    29472947
    2948 /** Creates a new p2PendingImfile table
    2949  *
    2950  * @return true on success
    2951  */
    2952 
    2953 bool p2PendingImfileCreateTable(
     2948/** Creates a new chipPendingImfile table
     2949 *
     2950 * @return true on success
     2951 */
     2952
     2953bool chipPendingImfileCreateTable(
    29542954    psDB            *dbh                ///< Database handle
    29552955);
    29562956
    2957 /** Deletes a p2PendingImfile table
    2958  *
    2959  * @return true on success
    2960  */
    2961 
    2962 bool p2PendingImfileDropTable(
     2957/** Deletes a chipPendingImfile table
     2958 *
     2959 * @return true on success
     2960 */
     2961
     2962bool chipPendingImfileDropTable(
    29632963    psDB            *dbh                ///< Database handle
    29642964);
     
    29712971 */
    29722972
    2973 bool p2PendingImfileInsert(
     2973bool chipPendingImfileInsert(
    29742974    psDB            *dbh,               ///< Database handle
    29752975    const char      *exp_tag,
    2976     psS32           p2_version,
    2977     psS32           p1_version,
     2976    psS32           chip_version,
     2977    psS32           guide_version,
    29782978    const char      *class_id,
    29792979    const char      *recipe,
     
    29862986 */
    29872987
    2988 long long p2PendingImfileDelete(
     2988long long chipPendingImfileDelete(
    29892989    psDB            *dbh,               ///< Database handle
    29902990    const psMetadata *where,            ///< Row match criteria
     
    29922992);
    29932993
    2994 /** Insert a single p2PendingImfileRow object into a table
     2994/** Insert a single chipPendingImfileRow object into a table
    29952995 *
    29962996 * This function constructs and inserts a single row based on it's parameters.
     
    29992999 */
    30003000
    3001 bool p2PendingImfileInsertObject(
    3002     psDB            *dbh,               ///< Database handle
    3003     p2PendingImfileRow *object             ///< p2PendingImfileRow object
    3004 );
    3005 
    3006 /** Insert an array of p2PendingImfileRow object into a table
     3001bool chipPendingImfileInsertObject(
     3002    psDB            *dbh,               ///< Database handle
     3003    chipPendingImfileRow *object             ///< chipPendingImfileRow object
     3004);
     3005
     3006/** Insert an array of chipPendingImfileRow object into a table
    30073007 *
    30083008 * This function constructs and inserts multiple rows based on it's parameters.
     
    30113011 */
    30123012
    3013 bool p2PendingImfileInsertObjects(
    3014     psDB            *dbh,               ///< Database handle
    3015     psArray         *objects            ///< array of p2PendingImfileRow objects
    3016 );
    3017 
    3018 /** Insert data from a binary FITS table p2PendingImfileRow into the database
     3013bool chipPendingImfileInsertObjects(
     3014    psDB            *dbh,               ///< Database handle
     3015    psArray         *objects            ///< array of chipPendingImfileRow objects
     3016);
     3017
     3018/** Insert data from a binary FITS table chipPendingImfileRow into the database
    30193019 *
    30203020 * This function expects a psFits object with a FITS table as the first
     
    30263026 */
    30273027
    3028 bool p2PendingImfileInsertFits(
     3028bool chipPendingImfileInsertFits(
    30293029    psDB            *dbh,               ///< Database handle
    30303030    const psFits    *fits               ///< psFits object
     
    30413041 */
    30423042
    3043 bool p2PendingImfileSelectRowsFits(
     3043bool chipPendingImfileSelectRowsFits(
    30443044    psDB            *dbh,               ///< Database handle
    30453045    psFits          *fits,              ///< psFits object
     
    30483048);
    30493049
    3050 /** Convert a p2PendingImfileRow into an equivalent psMetadata
     3050/** Convert a chipPendingImfileRow into an equivalent psMetadata
    30513051 *
    30523052 * @return A psMetadata pointer or NULL on error
    30533053 */
    30543054
    3055 psMetadata *p2PendingImfileMetadataFromObject(
    3056     const p2PendingImfileRow *object             ///< fooRow to convert into a psMetadata
     3055psMetadata *chipPendingImfileMetadataFromObject(
     3056    const chipPendingImfileRow *object             ///< fooRow to convert into a psMetadata
    30573057);
    30583058
    30593059/** Convert a psMetadata into an equivalent fooRow
    30603060 *
    3061  * @return A p2PendingImfileRow pointer or NULL on error
    3062  */
    3063 
    3064 p2PendingImfileRow *p2PendingImfileObjectFromMetadata(
     3061 * @return A chipPendingImfileRow pointer or NULL on error
     3062 */
     3063
     3064chipPendingImfileRow *chipPendingImfileObjectFromMetadata(
    30653065    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    30663066);
    3067 /** Selects up to limit rows from the database and returns as p2PendingImfileRow objects in a psArray
     3067/** Selects up to limit rows from the database and returns as chipPendingImfileRow objects in a psArray
    30683068 *
    30693069 *  See psDBSelectRows() for documentation on the format of where.
     
    30723072 */
    30733073
    3074 psArray *p2PendingImfileSelectRowObjects(
     3074psArray *chipPendingImfileSelectRowObjects(
    30753075    psDB            *dbh,               ///< Database handle
    30763076    const psMetadata *where,            ///< Row match criteria
    30773077    unsigned long long limit            ///< Maximum number of elements to return
    30783078);
    3079 /** Deletes a row from the database coresponding to an p2PendingImfile
     3079/** Deletes a row from the database coresponding to an chipPendingImfile
    30803080 *
    30813081 *  Note that a 'where' search psMetadata is constructed from each object and
     
    30853085 */
    30863086
    3087 bool p2PendingImfileDeleteObject(
    3088     psDB            *dbh,               ///< Database handle
    3089     const p2PendingImfileRow *object    ///< Object to delete
     3087bool chipPendingImfileDeleteObject(
     3088    psDB            *dbh,               ///< Database handle
     3089    const chipPendingImfileRow *object    ///< Object to delete
    30903090);
    30913091/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    30973097 */
    30983098
    3099 long long p2PendingImfileDeleteRowObjects(
     3099long long chipPendingImfileDeleteRowObjects(
    31003100    psDB            *dbh,               ///< Database handle
    31013101    const psArray   *objects,           ///< Array of objects to delete
    31023102    unsigned long long limit            ///< Maximum number of elements to delete
    31033103);
    3104 /** Formats and prints an array of p2PendingImfileRow objects
     3104/** Formats and prints an array of chipPendingImfileRow objects
    31053105 *
    31063106 * When mdcf is set the formated output is in psMetadataConfig
     
    31103110 */
    31113111
    3112 bool p2PendingImfilePrintObjects(
     3112bool chipPendingImfilePrintObjects(
    31133113    FILE            *stream,            ///< a stream
    3114     psArray         *objects,           ///< An array of p2PendingImfileRow objects
     3114    psArray         *objects,           ///< An array of chipPendingImfileRow objects
    31153115    bool            mdcf                ///< format as mdconfig or simple
    31163116);
    3117 /** Formats and prints an p2PendingImfileRow object
     3117/** Formats and prints an chipPendingImfileRow object
    31183118 *
    31193119 * When mdcf is set the formated output is in psMetadataConfig
     
    31233123 */
    31243124
    3125 bool p2PendingImfilePrintObject(
     3125bool chipPendingImfilePrintObject(
    31263126    FILE            *stream,            ///< a stream
    3127     p2PendingImfileRow *object,    ///< an p2PendingImfileRow object
     3127    chipPendingImfileRow *object,    ///< an chipPendingImfileRow object
    31283128    bool            mdcf                ///< format as mdconfig or simple
    31293129);
    3130 /** p2ProcessedExpRow data structure
    3131  *
    3132  * Structure for representing a single row of p2ProcessedExp table data.
     3130/** chipProcessedExpRow data structure
     3131 *
     3132 * Structure for representing a single row of chipProcessedExp table data.
    31333133 */
    31343134
    31353135typedef struct {
    31363136    char            *exp_tag;
    3137     psS32           p2_version;
    3138     psS32           p1_version;
     3137    psS32           chip_version;
     3138    psS32           guide_version;
    31393139    char            *label;
    31403140    char            *expgroup;
    31413141    char            *dvodb;
    3142 } p2ProcessedExpRow;
    3143 
    3144 /** Creates a new p2ProcessedExpRow object
    3145  *
    3146  *  @return A new p2ProcessedExpRow object or NULL on failure.
    3147  */
    3148 
    3149 p2ProcessedExpRow *p2ProcessedExpRowAlloc(
     3142} chipProcessedExpRow;
     3143
     3144/** Creates a new chipProcessedExpRow object
     3145 *
     3146 *  @return A new chipProcessedExpRow object or NULL on failure.
     3147 */
     3148
     3149chipProcessedExpRow *chipProcessedExpRowAlloc(
    31503150    const char      *exp_tag,
    3151     psS32           p2_version,
    3152     psS32           p1_version,
     3151    psS32           chip_version,
     3152    psS32           guide_version,
    31533153    const char      *label,
    31543154    const char      *expgroup,
     
    31563156);
    31573157
    3158 /** Creates a new p2ProcessedExp table
    3159  *
    3160  * @return true on success
    3161  */
    3162 
    3163 bool p2ProcessedExpCreateTable(
     3158/** Creates a new chipProcessedExp table
     3159 *
     3160 * @return true on success
     3161 */
     3162
     3163bool chipProcessedExpCreateTable(
    31643164    psDB            *dbh                ///< Database handle
    31653165);
    31663166
    3167 /** Deletes a p2ProcessedExp table
    3168  *
    3169  * @return true on success
    3170  */
    3171 
    3172 bool p2ProcessedExpDropTable(
     3167/** Deletes a chipProcessedExp table
     3168 *
     3169 * @return true on success
     3170 */
     3171
     3172bool chipProcessedExpDropTable(
    31733173    psDB            *dbh                ///< Database handle
    31743174);
     
    31813181 */
    31823182
    3183 bool p2ProcessedExpInsert(
     3183bool chipProcessedExpInsert(
    31843184    psDB            *dbh,               ///< Database handle
    31853185    const char      *exp_tag,
    3186     psS32           p2_version,
    3187     psS32           p1_version,
     3186    psS32           chip_version,
     3187    psS32           guide_version,
    31883188    const char      *label,
    31893189    const char      *expgroup,
     
    31963196 */
    31973197
    3198 long long p2ProcessedExpDelete(
     3198long long chipProcessedExpDelete(
    31993199    psDB            *dbh,               ///< Database handle
    32003200    const psMetadata *where,            ///< Row match criteria
     
    32023202);
    32033203
    3204 /** Insert a single p2ProcessedExpRow object into a table
     3204/** Insert a single chipProcessedExpRow object into a table
    32053205 *
    32063206 * This function constructs and inserts a single row based on it's parameters.
     
    32093209 */
    32103210
    3211 bool p2ProcessedExpInsertObject(
    3212     psDB            *dbh,               ///< Database handle
    3213     p2ProcessedExpRow *object             ///< p2ProcessedExpRow object
    3214 );
    3215 
    3216 /** Insert an array of p2ProcessedExpRow object into a table
     3211bool chipProcessedExpInsertObject(
     3212    psDB            *dbh,               ///< Database handle
     3213    chipProcessedExpRow *object             ///< chipProcessedExpRow object
     3214);
     3215
     3216/** Insert an array of chipProcessedExpRow object into a table
    32173217 *
    32183218 * This function constructs and inserts multiple rows based on it's parameters.
     
    32213221 */
    32223222
    3223 bool p2ProcessedExpInsertObjects(
    3224     psDB            *dbh,               ///< Database handle
    3225     psArray         *objects            ///< array of p2ProcessedExpRow objects
    3226 );
    3227 
    3228 /** Insert data from a binary FITS table p2ProcessedExpRow into the database
     3223bool chipProcessedExpInsertObjects(
     3224    psDB            *dbh,               ///< Database handle
     3225    psArray         *objects            ///< array of chipProcessedExpRow objects
     3226);
     3227
     3228/** Insert data from a binary FITS table chipProcessedExpRow into the database
    32293229 *
    32303230 * This function expects a psFits object with a FITS table as the first
     
    32363236 */
    32373237
    3238 bool p2ProcessedExpInsertFits(
     3238bool chipProcessedExpInsertFits(
    32393239    psDB            *dbh,               ///< Database handle
    32403240    const psFits    *fits               ///< psFits object
     
    32513251 */
    32523252
    3253 bool p2ProcessedExpSelectRowsFits(
     3253bool chipProcessedExpSelectRowsFits(
    32543254    psDB            *dbh,               ///< Database handle
    32553255    psFits          *fits,              ///< psFits object
     
    32583258);
    32593259
    3260 /** Convert a p2ProcessedExpRow into an equivalent psMetadata
     3260/** Convert a chipProcessedExpRow into an equivalent psMetadata
    32613261 *
    32623262 * @return A psMetadata pointer or NULL on error
    32633263 */
    32643264
    3265 psMetadata *p2ProcessedExpMetadataFromObject(
    3266     const p2ProcessedExpRow *object             ///< fooRow to convert into a psMetadata
     3265psMetadata *chipProcessedExpMetadataFromObject(
     3266    const chipProcessedExpRow *object             ///< fooRow to convert into a psMetadata
    32673267);
    32683268
    32693269/** Convert a psMetadata into an equivalent fooRow
    32703270 *
    3271  * @return A p2ProcessedExpRow pointer or NULL on error
    3272  */
    3273 
    3274 p2ProcessedExpRow *p2ProcessedExpObjectFromMetadata(
     3271 * @return A chipProcessedExpRow pointer or NULL on error
     3272 */
     3273
     3274chipProcessedExpRow *chipProcessedExpObjectFromMetadata(
    32753275    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    32763276);
    3277 /** Selects up to limit rows from the database and returns as p2ProcessedExpRow objects in a psArray
     3277/** Selects up to limit rows from the database and returns as chipProcessedExpRow objects in a psArray
    32783278 *
    32793279 *  See psDBSelectRows() for documentation on the format of where.
     
    32823282 */
    32833283
    3284 psArray *p2ProcessedExpSelectRowObjects(
     3284psArray *chipProcessedExpSelectRowObjects(
    32853285    psDB            *dbh,               ///< Database handle
    32863286    const psMetadata *where,            ///< Row match criteria
    32873287    unsigned long long limit            ///< Maximum number of elements to return
    32883288);
    3289 /** Deletes a row from the database coresponding to an p2ProcessedExp
     3289/** Deletes a row from the database coresponding to an chipProcessedExp
    32903290 *
    32913291 *  Note that a 'where' search psMetadata is constructed from each object and
     
    32953295 */
    32963296
    3297 bool p2ProcessedExpDeleteObject(
    3298     psDB            *dbh,               ///< Database handle
    3299     const p2ProcessedExpRow *object    ///< Object to delete
     3297bool chipProcessedExpDeleteObject(
     3298    psDB            *dbh,               ///< Database handle
     3299    const chipProcessedExpRow *object    ///< Object to delete
    33003300);
    33013301/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    33073307 */
    33083308
    3309 long long p2ProcessedExpDeleteRowObjects(
     3309long long chipProcessedExpDeleteRowObjects(
    33103310    psDB            *dbh,               ///< Database handle
    33113311    const psArray   *objects,           ///< Array of objects to delete
    33123312    unsigned long long limit            ///< Maximum number of elements to delete
    33133313);
    3314 /** Formats and prints an array of p2ProcessedExpRow objects
     3314/** Formats and prints an array of chipProcessedExpRow objects
    33153315 *
    33163316 * When mdcf is set the formated output is in psMetadataConfig
     
    33203320 */
    33213321
    3322 bool p2ProcessedExpPrintObjects(
     3322bool chipProcessedExpPrintObjects(
    33233323    FILE            *stream,            ///< a stream
    3324     psArray         *objects,           ///< An array of p2ProcessedExpRow objects
     3324    psArray         *objects,           ///< An array of chipProcessedExpRow objects
    33253325    bool            mdcf                ///< format as mdconfig or simple
    33263326);
    3327 /** Formats and prints an p2ProcessedExpRow object
     3327/** Formats and prints an chipProcessedExpRow object
    33283328 *
    33293329 * When mdcf is set the formated output is in psMetadataConfig
     
    33333333 */
    33343334
    3335 bool p2ProcessedExpPrintObject(
     3335bool chipProcessedExpPrintObject(
    33363336    FILE            *stream,            ///< a stream
    3337     p2ProcessedExpRow *object,    ///< an p2ProcessedExpRow object
     3337    chipProcessedExpRow *object,    ///< an chipProcessedExpRow object
    33383338    bool            mdcf                ///< format as mdconfig or simple
    33393339);
    3340 /** p2MaskRow data structure
    3341  *
    3342  * Structure for representing a single row of p2Mask table data.
     3340/** chipMaskRow data structure
     3341 *
     3342 * Structure for representing a single row of chipMask table data.
    33433343 */
    33443344
    33453345typedef struct {
    33463346    char            *label;
    3347 } p2MaskRow;
    3348 
    3349 /** Creates a new p2MaskRow object
    3350  *
    3351  *  @return A new p2MaskRow object or NULL on failure.
    3352  */
    3353 
    3354 p2MaskRow *p2MaskRowAlloc(
     3347} chipMaskRow;
     3348
     3349/** Creates a new chipMaskRow object
     3350 *
     3351 *  @return A new chipMaskRow object or NULL on failure.
     3352 */
     3353
     3354chipMaskRow *chipMaskRowAlloc(
    33553355    const char      *label
    33563356);
    33573357
    3358 /** Creates a new p2Mask table
    3359  *
    3360  * @return true on success
    3361  */
    3362 
    3363 bool p2MaskCreateTable(
     3358/** Creates a new chipMask table
     3359 *
     3360 * @return true on success
     3361 */
     3362
     3363bool chipMaskCreateTable(
    33643364    psDB            *dbh                ///< Database handle
    33653365);
    33663366
    3367 /** Deletes a p2Mask table
    3368  *
    3369  * @return true on success
    3370  */
    3371 
    3372 bool p2MaskDropTable(
     3367/** Deletes a chipMask table
     3368 *
     3369 * @return true on success
     3370 */
     3371
     3372bool chipMaskDropTable(
    33733373    psDB            *dbh                ///< Database handle
    33743374);
     
    33813381 */
    33823382
    3383 bool p2MaskInsert(
     3383bool chipMaskInsert(
    33843384    psDB            *dbh,               ///< Database handle
    33853385    const char      *label
     
    33913391 */
    33923392
    3393 long long p2MaskDelete(
     3393long long chipMaskDelete(
    33943394    psDB            *dbh,               ///< Database handle
    33953395    const psMetadata *where,            ///< Row match criteria
     
    33973397);
    33983398
    3399 /** Insert a single p2MaskRow object into a table
     3399/** Insert a single chipMaskRow object into a table
    34003400 *
    34013401 * This function constructs and inserts a single row based on it's parameters.
     
    34043404 */
    34053405
    3406 bool p2MaskInsertObject(
    3407     psDB            *dbh,               ///< Database handle
    3408     p2MaskRow       *object             ///< p2MaskRow object
    3409 );
    3410 
    3411 /** Insert an array of p2MaskRow object into a table
     3406bool chipMaskInsertObject(
     3407    psDB            *dbh,               ///< Database handle
     3408    chipMaskRow     *object             ///< chipMaskRow object
     3409);
     3410
     3411/** Insert an array of chipMaskRow object into a table
    34123412 *
    34133413 * This function constructs and inserts multiple rows based on it's parameters.
     
    34163416 */
    34173417
    3418 bool p2MaskInsertObjects(
    3419     psDB            *dbh,               ///< Database handle
    3420     psArray         *objects            ///< array of p2MaskRow objects
    3421 );
    3422 
    3423 /** Insert data from a binary FITS table p2MaskRow into the database
     3418bool chipMaskInsertObjects(
     3419    psDB            *dbh,               ///< Database handle
     3420    psArray         *objects            ///< array of chipMaskRow objects
     3421);
     3422
     3423/** Insert data from a binary FITS table chipMaskRow into the database
    34243424 *
    34253425 * This function expects a psFits object with a FITS table as the first
     
    34313431 */
    34323432
    3433 bool p2MaskInsertFits(
     3433bool chipMaskInsertFits(
    34343434    psDB            *dbh,               ///< Database handle
    34353435    const psFits    *fits               ///< psFits object
     
    34463446 */
    34473447
    3448 bool p2MaskSelectRowsFits(
     3448bool chipMaskSelectRowsFits(
    34493449    psDB            *dbh,               ///< Database handle
    34503450    psFits          *fits,              ///< psFits object
     
    34533453);
    34543454
    3455 /** Convert a p2MaskRow into an equivalent psMetadata
     3455/** Convert a chipMaskRow into an equivalent psMetadata
    34563456 *
    34573457 * @return A psMetadata pointer or NULL on error
    34583458 */
    34593459
    3460 psMetadata *p2MaskMetadataFromObject(
    3461     const p2MaskRow *object             ///< fooRow to convert into a psMetadata
     3460psMetadata *chipMaskMetadataFromObject(
     3461    const chipMaskRow *object             ///< fooRow to convert into a psMetadata
    34623462);
    34633463
    34643464/** Convert a psMetadata into an equivalent fooRow
    34653465 *
    3466  * @return A p2MaskRow pointer or NULL on error
    3467  */
    3468 
    3469 p2MaskRow *p2MaskObjectFromMetadata(
     3466 * @return A chipMaskRow pointer or NULL on error
     3467 */
     3468
     3469chipMaskRow *chipMaskObjectFromMetadata(
    34703470    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    34713471);
    3472 /** Selects up to limit rows from the database and returns as p2MaskRow objects in a psArray
     3472/** Selects up to limit rows from the database and returns as chipMaskRow objects in a psArray
    34733473 *
    34743474 *  See psDBSelectRows() for documentation on the format of where.
     
    34773477 */
    34783478
    3479 psArray *p2MaskSelectRowObjects(
     3479psArray *chipMaskSelectRowObjects(
    34803480    psDB            *dbh,               ///< Database handle
    34813481    const psMetadata *where,            ///< Row match criteria
    34823482    unsigned long long limit            ///< Maximum number of elements to return
    34833483);
    3484 /** Deletes a row from the database coresponding to an p2Mask
     3484/** Deletes a row from the database coresponding to an chipMask
    34853485 *
    34863486 *  Note that a 'where' search psMetadata is constructed from each object and
     
    34903490 */
    34913491
    3492 bool p2MaskDeleteObject(
    3493     psDB            *dbh,               ///< Database handle
    3494     const p2MaskRow *object    ///< Object to delete
     3492bool chipMaskDeleteObject(
     3493    psDB            *dbh,               ///< Database handle
     3494    const chipMaskRow *object    ///< Object to delete
    34953495);
    34963496/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    35023502 */
    35033503
    3504 long long p2MaskDeleteRowObjects(
     3504long long chipMaskDeleteRowObjects(
    35053505    psDB            *dbh,               ///< Database handle
    35063506    const psArray   *objects,           ///< Array of objects to delete
    35073507    unsigned long long limit            ///< Maximum number of elements to delete
    35083508);
    3509 /** Formats and prints an array of p2MaskRow objects
     3509/** Formats and prints an array of chipMaskRow objects
    35103510 *
    35113511 * When mdcf is set the formated output is in psMetadataConfig
     
    35153515 */
    35163516
    3517 bool p2MaskPrintObjects(
     3517bool chipMaskPrintObjects(
    35183518    FILE            *stream,            ///< a stream
    3519     psArray         *objects,           ///< An array of p2MaskRow objects
     3519    psArray         *objects,           ///< An array of chipMaskRow objects
    35203520    bool            mdcf                ///< format as mdconfig or simple
    35213521);
    3522 /** Formats and prints an p2MaskRow object
     3522/** Formats and prints an chipMaskRow object
    35233523 *
    35243524 * When mdcf is set the formated output is in psMetadataConfig
     
    35283528 */
    35293529
    3530 bool p2MaskPrintObject(
     3530bool chipMaskPrintObject(
    35313531    FILE            *stream,            ///< a stream
    3532     p2MaskRow *object,    ///< an p2MaskRow object
     3532    chipMaskRow *object,    ///< an chipMaskRow object
    35333533    bool            mdcf                ///< format as mdconfig or simple
    35343534);
    3535 /** p2ProcessedImfileRow data structure
    3536  *
    3537  * Structure for representing a single row of p2ProcessedImfile table data.
     3535/** chipProcessedImfileRow data structure
     3536 *
     3537 * Structure for representing a single row of chipProcessedImfile table data.
    35383538 */
    35393539
    35403540typedef struct {
    35413541    char            *exp_tag;
    3542     psS32           p2_version;
    3543     psS32           p1_version;
     3542    psS32           chip_version;
     3543    psS32           guide_version;
    35443544    char            *class_id;
    35453545    char            *recipe;
     
    35513551    char            *b2_uri;
    35523552    psS16           fault;
    3553 } p2ProcessedImfileRow;
    3554 
    3555 /** Creates a new p2ProcessedImfileRow object
    3556  *
    3557  *  @return A new p2ProcessedImfileRow object or NULL on failure.
    3558  */
    3559 
    3560 p2ProcessedImfileRow *p2ProcessedImfileRowAlloc(
     3553} chipProcessedImfileRow;
     3554
     3555/** Creates a new chipProcessedImfileRow object
     3556 *
     3557 *  @return A new chipProcessedImfileRow object or NULL on failure.
     3558 */
     3559
     3560chipProcessedImfileRow *chipProcessedImfileRowAlloc(
    35613561    const char      *exp_tag,
    3562     psS32           p2_version,
    3563     psS32           p1_version,
     3562    psS32           chip_version,
     3563    psS32           guide_version,
    35643564    const char      *class_id,
    35653565    const char      *recipe,
     
    35733573);
    35743574
    3575 /** Creates a new p2ProcessedImfile table
    3576  *
    3577  * @return true on success
    3578  */
    3579 
    3580 bool p2ProcessedImfileCreateTable(
     3575/** Creates a new chipProcessedImfile table
     3576 *
     3577 * @return true on success
     3578 */
     3579
     3580bool chipProcessedImfileCreateTable(
    35813581    psDB            *dbh                ///< Database handle
    35823582);
    35833583
    3584 /** Deletes a p2ProcessedImfile table
    3585  *
    3586  * @return true on success
    3587  */
    3588 
    3589 bool p2ProcessedImfileDropTable(
     3584/** Deletes a chipProcessedImfile table
     3585 *
     3586 * @return true on success
     3587 */
     3588
     3589bool chipProcessedImfileDropTable(
    35903590    psDB            *dbh                ///< Database handle
    35913591);
     
    35983598 */
    35993599
    3600 bool p2ProcessedImfileInsert(
     3600bool chipProcessedImfileInsert(
    36013601    psDB            *dbh,               ///< Database handle
    36023602    const char      *exp_tag,
    3603     psS32           p2_version,
    3604     psS32           p1_version,
     3603    psS32           chip_version,
     3604    psS32           guide_version,
    36053605    const char      *class_id,
    36063606    const char      *recipe,
     
    36193619 */
    36203620
    3621 long long p2ProcessedImfileDelete(
     3621long long chipProcessedImfileDelete(
    36223622    psDB            *dbh,               ///< Database handle
    36233623    const psMetadata *where,            ///< Row match criteria
     
    36253625);
    36263626
    3627 /** Insert a single p2ProcessedImfileRow object into a table
     3627/** Insert a single chipProcessedImfileRow object into a table
    36283628 *
    36293629 * This function constructs and inserts a single row based on it's parameters.
     
    36323632 */
    36333633
    3634 bool p2ProcessedImfileInsertObject(
    3635     psDB            *dbh,               ///< Database handle
    3636     p2ProcessedImfileRow *object             ///< p2ProcessedImfileRow object
    3637 );
    3638 
    3639 /** Insert an array of p2ProcessedImfileRow object into a table
     3634bool chipProcessedImfileInsertObject(
     3635    psDB            *dbh,               ///< Database handle
     3636    chipProcessedImfileRow *object             ///< chipProcessedImfileRow object
     3637);
     3638
     3639/** Insert an array of chipProcessedImfileRow object into a table
    36403640 *
    36413641 * This function constructs and inserts multiple rows based on it's parameters.
     
    36443644 */
    36453645
    3646 bool p2ProcessedImfileInsertObjects(
    3647     psDB            *dbh,               ///< Database handle
    3648     psArray         *objects            ///< array of p2ProcessedImfileRow objects
    3649 );
    3650 
    3651 /** Insert data from a binary FITS table p2ProcessedImfileRow into the database
     3646bool chipProcessedImfileInsertObjects(
     3647    psDB            *dbh,               ///< Database handle
     3648    psArray         *objects            ///< array of chipProcessedImfileRow objects
     3649);
     3650
     3651/** Insert data from a binary FITS table chipProcessedImfileRow into the database
    36523652 *
    36533653 * This function expects a psFits object with a FITS table as the first
     
    36593659 */
    36603660
    3661 bool p2ProcessedImfileInsertFits(
     3661bool chipProcessedImfileInsertFits(
    36623662    psDB            *dbh,               ///< Database handle
    36633663    const psFits    *fits               ///< psFits object
     
    36743674 */
    36753675
    3676 bool p2ProcessedImfileSelectRowsFits(
     3676bool chipProcessedImfileSelectRowsFits(
    36773677    psDB            *dbh,               ///< Database handle
    36783678    psFits          *fits,              ///< psFits object
     
    36813681);
    36823682
    3683 /** Convert a p2ProcessedImfileRow into an equivalent psMetadata
     3683/** Convert a chipProcessedImfileRow into an equivalent psMetadata
    36843684 *
    36853685 * @return A psMetadata pointer or NULL on error
    36863686 */
    36873687
    3688 psMetadata *p2ProcessedImfileMetadataFromObject(
    3689     const p2ProcessedImfileRow *object             ///< fooRow to convert into a psMetadata
     3688psMetadata *chipProcessedImfileMetadataFromObject(
     3689    const chipProcessedImfileRow *object             ///< fooRow to convert into a psMetadata
    36903690);
    36913691
    36923692/** Convert a psMetadata into an equivalent fooRow
    36933693 *
    3694  * @return A p2ProcessedImfileRow pointer or NULL on error
    3695  */
    3696 
    3697 p2ProcessedImfileRow *p2ProcessedImfileObjectFromMetadata(
     3694 * @return A chipProcessedImfileRow pointer or NULL on error
     3695 */
     3696
     3697chipProcessedImfileRow *chipProcessedImfileObjectFromMetadata(
    36983698    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    36993699);
    3700 /** Selects up to limit rows from the database and returns as p2ProcessedImfileRow objects in a psArray
     3700/** Selects up to limit rows from the database and returns as chipProcessedImfileRow objects in a psArray
    37013701 *
    37023702 *  See psDBSelectRows() for documentation on the format of where.
     
    37053705 */
    37063706
    3707 psArray *p2ProcessedImfileSelectRowObjects(
     3707psArray *chipProcessedImfileSelectRowObjects(
    37083708    psDB            *dbh,               ///< Database handle
    37093709    const psMetadata *where,            ///< Row match criteria
    37103710    unsigned long long limit            ///< Maximum number of elements to return
    37113711);
    3712 /** Deletes a row from the database coresponding to an p2ProcessedImfile
     3712/** Deletes a row from the database coresponding to an chipProcessedImfile
    37133713 *
    37143714 *  Note that a 'where' search psMetadata is constructed from each object and
     
    37183718 */
    37193719
    3720 bool p2ProcessedImfileDeleteObject(
    3721     psDB            *dbh,               ///< Database handle
    3722     const p2ProcessedImfileRow *object    ///< Object to delete
     3720bool chipProcessedImfileDeleteObject(
     3721    psDB            *dbh,               ///< Database handle
     3722    const chipProcessedImfileRow *object    ///< Object to delete
    37233723);
    37243724/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    37303730 */
    37313731
    3732 long long p2ProcessedImfileDeleteRowObjects(
     3732long long chipProcessedImfileDeleteRowObjects(
    37333733    psDB            *dbh,               ///< Database handle
    37343734    const psArray   *objects,           ///< Array of objects to delete
    37353735    unsigned long long limit            ///< Maximum number of elements to delete
    37363736);
    3737 /** Formats and prints an array of p2ProcessedImfileRow objects
     3737/** Formats and prints an array of chipProcessedImfileRow objects
    37383738 *
    37393739 * When mdcf is set the formated output is in psMetadataConfig
     
    37433743 */
    37443744
    3745 bool p2ProcessedImfilePrintObjects(
     3745bool chipProcessedImfilePrintObjects(
    37463746    FILE            *stream,            ///< a stream
    3747     psArray         *objects,           ///< An array of p2ProcessedImfileRow objects
     3747    psArray         *objects,           ///< An array of chipProcessedImfileRow objects
    37483748    bool            mdcf                ///< format as mdconfig or simple
    37493749);
    3750 /** Formats and prints an p2ProcessedImfileRow object
     3750/** Formats and prints an chipProcessedImfileRow object
    37513751 *
    37523752 * When mdcf is set the formated output is in psMetadataConfig
     
    37563756 */
    37573757
    3758 bool p2ProcessedImfilePrintObject(
     3758bool chipProcessedImfilePrintObject(
    37593759    FILE            *stream,            ///< a stream
    3760     p2ProcessedImfileRow *object,    ///< an p2ProcessedImfileRow object
     3760    chipProcessedImfileRow *object,    ///< an chipProcessedImfileRow object
    37613761    bool            mdcf                ///< format as mdconfig or simple
    37623762);
    3763 /** p3PendingExpRow data structure
    3764  *
    3765  * Structure for representing a single row of p3PendingExp table data.
     3763/** camPendingExpRow data structure
     3764 *
     3765 * Structure for representing a single row of camPendingExp table data.
    37663766 */
    37673767
    37683768typedef struct {
    37693769    char            *exp_tag;
    3770     psS32           p3_version;
    3771     psS32           p2_version;
     3770    psS32           cam_version;
     3771    psS32           chip_version;
    37723772    char            *label;
    37733773    char            *expgroup;
    37743774    char            *dvodb;
    3775 } p3PendingExpRow;
    3776 
    3777 /** Creates a new p3PendingExpRow object
    3778  *
    3779  *  @return A new p3PendingExpRow object or NULL on failure.
    3780  */
    3781 
    3782 p3PendingExpRow *p3PendingExpRowAlloc(
     3775} camPendingExpRow;
     3776
     3777/** Creates a new camPendingExpRow object
     3778 *
     3779 *  @return A new camPendingExpRow object or NULL on failure.
     3780 */
     3781
     3782camPendingExpRow *camPendingExpRowAlloc(
    37833783    const char      *exp_tag,
    3784     psS32           p3_version,
    3785     psS32           p2_version,
     3784    psS32           cam_version,
     3785    psS32           chip_version,
    37863786    const char      *label,
    37873787    const char      *expgroup,
     
    37893789);
    37903790
    3791 /** Creates a new p3PendingExp table
    3792  *
    3793  * @return true on success
    3794  */
    3795 
    3796 bool p3PendingExpCreateTable(
     3791/** Creates a new camPendingExp table
     3792 *
     3793 * @return true on success
     3794 */
     3795
     3796bool camPendingExpCreateTable(
    37973797    psDB            *dbh                ///< Database handle
    37983798);
    37993799
    3800 /** Deletes a p3PendingExp table
    3801  *
    3802  * @return true on success
    3803  */
    3804 
    3805 bool p3PendingExpDropTable(
     3800/** Deletes a camPendingExp table
     3801 *
     3802 * @return true on success
     3803 */
     3804
     3805bool camPendingExpDropTable(
    38063806    psDB            *dbh                ///< Database handle
    38073807);
     
    38143814 */
    38153815
    3816 bool p3PendingExpInsert(
     3816bool camPendingExpInsert(
    38173817    psDB            *dbh,               ///< Database handle
    38183818    const char      *exp_tag,
    3819     psS32           p3_version,
    3820     psS32           p2_version,
     3819    psS32           cam_version,
     3820    psS32           chip_version,
    38213821    const char      *label,
    38223822    const char      *expgroup,
     
    38293829 */
    38303830
    3831 long long p3PendingExpDelete(
     3831long long camPendingExpDelete(
    38323832    psDB            *dbh,               ///< Database handle
    38333833    const psMetadata *where,            ///< Row match criteria
     
    38353835);
    38363836
    3837 /** Insert a single p3PendingExpRow object into a table
     3837/** Insert a single camPendingExpRow object into a table
    38383838 *
    38393839 * This function constructs and inserts a single row based on it's parameters.
     
    38423842 */
    38433843
    3844 bool p3PendingExpInsertObject(
    3845     psDB            *dbh,               ///< Database handle
    3846     p3PendingExpRow *object             ///< p3PendingExpRow object
    3847 );
    3848 
    3849 /** Insert an array of p3PendingExpRow object into a table
     3844bool camPendingExpInsertObject(
     3845    psDB            *dbh,               ///< Database handle
     3846    camPendingExpRow *object             ///< camPendingExpRow object
     3847);
     3848
     3849/** Insert an array of camPendingExpRow object into a table
    38503850 *
    38513851 * This function constructs and inserts multiple rows based on it's parameters.
     
    38543854 */
    38553855
    3856 bool p3PendingExpInsertObjects(
    3857     psDB            *dbh,               ///< Database handle
    3858     psArray         *objects            ///< array of p3PendingExpRow objects
    3859 );
    3860 
    3861 /** Insert data from a binary FITS table p3PendingExpRow into the database
     3856bool camPendingExpInsertObjects(
     3857    psDB            *dbh,               ///< Database handle
     3858    psArray         *objects            ///< array of camPendingExpRow objects
     3859);
     3860
     3861/** Insert data from a binary FITS table camPendingExpRow into the database
    38623862 *
    38633863 * This function expects a psFits object with a FITS table as the first
     
    38693869 */
    38703870
    3871 bool p3PendingExpInsertFits(
     3871bool camPendingExpInsertFits(
    38723872    psDB            *dbh,               ///< Database handle
    38733873    const psFits    *fits               ///< psFits object
     
    38843884 */
    38853885
    3886 bool p3PendingExpSelectRowsFits(
     3886bool camPendingExpSelectRowsFits(
    38873887    psDB            *dbh,               ///< Database handle
    38883888    psFits          *fits,              ///< psFits object
     
    38913891);
    38923892
    3893 /** Convert a p3PendingExpRow into an equivalent psMetadata
     3893/** Convert a camPendingExpRow into an equivalent psMetadata
    38943894 *
    38953895 * @return A psMetadata pointer or NULL on error
    38963896 */
    38973897
    3898 psMetadata *p3PendingExpMetadataFromObject(
    3899     const p3PendingExpRow *object             ///< fooRow to convert into a psMetadata
     3898psMetadata *camPendingExpMetadataFromObject(
     3899    const camPendingExpRow *object             ///< fooRow to convert into a psMetadata
    39003900);
    39013901
    39023902/** Convert a psMetadata into an equivalent fooRow
    39033903 *
    3904  * @return A p3PendingExpRow pointer or NULL on error
    3905  */
    3906 
    3907 p3PendingExpRow *p3PendingExpObjectFromMetadata(
     3904 * @return A camPendingExpRow pointer or NULL on error
     3905 */
     3906
     3907camPendingExpRow *camPendingExpObjectFromMetadata(
    39083908    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    39093909);
    3910 /** Selects up to limit rows from the database and returns as p3PendingExpRow objects in a psArray
     3910/** Selects up to limit rows from the database and returns as camPendingExpRow objects in a psArray
    39113911 *
    39123912 *  See psDBSelectRows() for documentation on the format of where.
     
    39153915 */
    39163916
    3917 psArray *p3PendingExpSelectRowObjects(
     3917psArray *camPendingExpSelectRowObjects(
    39183918    psDB            *dbh,               ///< Database handle
    39193919    const psMetadata *where,            ///< Row match criteria
    39203920    unsigned long long limit            ///< Maximum number of elements to return
    39213921);
    3922 /** Deletes a row from the database coresponding to an p3PendingExp
     3922/** Deletes a row from the database coresponding to an camPendingExp
    39233923 *
    39243924 *  Note that a 'where' search psMetadata is constructed from each object and
     
    39283928 */
    39293929
    3930 bool p3PendingExpDeleteObject(
    3931     psDB            *dbh,               ///< Database handle
    3932     const p3PendingExpRow *object    ///< Object to delete
     3930bool camPendingExpDeleteObject(
     3931    psDB            *dbh,               ///< Database handle
     3932    const camPendingExpRow *object    ///< Object to delete
    39333933);
    39343934/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    39403940 */
    39413941
    3942 long long p3PendingExpDeleteRowObjects(
     3942long long camPendingExpDeleteRowObjects(
    39433943    psDB            *dbh,               ///< Database handle
    39443944    const psArray   *objects,           ///< Array of objects to delete
    39453945    unsigned long long limit            ///< Maximum number of elements to delete
    39463946);
    3947 /** Formats and prints an array of p3PendingExpRow objects
     3947/** Formats and prints an array of camPendingExpRow objects
    39483948 *
    39493949 * When mdcf is set the formated output is in psMetadataConfig
     
    39533953 */
    39543954
    3955 bool p3PendingExpPrintObjects(
     3955bool camPendingExpPrintObjects(
    39563956    FILE            *stream,            ///< a stream
    3957     psArray         *objects,           ///< An array of p3PendingExpRow objects
     3957    psArray         *objects,           ///< An array of camPendingExpRow objects
    39583958    bool            mdcf                ///< format as mdconfig or simple
    39593959);
    3960 /** Formats and prints an p3PendingExpRow object
     3960/** Formats and prints an camPendingExpRow object
    39613961 *
    39623962 * When mdcf is set the formated output is in psMetadataConfig
     
    39663966 */
    39673967
    3968 bool p3PendingExpPrintObject(
     3968bool camPendingExpPrintObject(
    39693969    FILE            *stream,            ///< a stream
    3970     p3PendingExpRow *object,    ///< an p3PendingExpRow object
     3970    camPendingExpRow *object,    ///< an camPendingExpRow object
    39713971    bool            mdcf                ///< format as mdconfig or simple
    39723972);
    3973 /** p3ProcessedExpRow data structure
    3974  *
    3975  * Structure for representing a single row of p3ProcessedExp table data.
     3973/** camProcessedExpRow data structure
     3974 *
     3975 * Structure for representing a single row of camProcessedExp table data.
    39763976 */
    39773977
    39783978typedef struct {
    39793979    char            *exp_tag;
    3980     psS32           p3_version;
    3981     psS32           p2_version;
     3980    psS32           cam_version;
     3981    psS32           chip_version;
    39823982    char            *label;
    39833983    char            *uri;
     
    39963996    char            *expgroup;
    39973997    char            *dvodb;
    3998 } p3ProcessedExpRow;
    3999 
    4000 /** Creates a new p3ProcessedExpRow object
    4001  *
    4002  *  @return A new p3ProcessedExpRow object or NULL on failure.
    4003  */
    4004 
    4005 p3ProcessedExpRow *p3ProcessedExpRowAlloc(
     3998} camProcessedExpRow;
     3999
     4000/** Creates a new camProcessedExpRow object
     4001 *
     4002 *  @return A new camProcessedExpRow object or NULL on failure.
     4003 */
     4004
     4005camProcessedExpRow *camProcessedExpRowAlloc(
    40064006    const char      *exp_tag,
    4007     psS32           p3_version,
    4008     psS32           p2_version,
     4007    psS32           cam_version,
     4008    psS32           chip_version,
    40094009    const char      *label,
    40104010    const char      *uri,
     
    40254025);
    40264026
    4027 /** Creates a new p3ProcessedExp table
    4028  *
    4029  * @return true on success
    4030  */
    4031 
    4032 bool p3ProcessedExpCreateTable(
     4027/** Creates a new camProcessedExp table
     4028 *
     4029 * @return true on success
     4030 */
     4031
     4032bool camProcessedExpCreateTable(
    40334033    psDB            *dbh                ///< Database handle
    40344034);
    40354035
    4036 /** Deletes a p3ProcessedExp table
    4037  *
    4038  * @return true on success
    4039  */
    4040 
    4041 bool p3ProcessedExpDropTable(
     4036/** Deletes a camProcessedExp table
     4037 *
     4038 * @return true on success
     4039 */
     4040
     4041bool camProcessedExpDropTable(
    40424042    psDB            *dbh                ///< Database handle
    40434043);
     
    40504050 */
    40514051
    4052 bool p3ProcessedExpInsert(
     4052bool camProcessedExpInsert(
    40534053    psDB            *dbh,               ///< Database handle
    40544054    const char      *exp_tag,
    4055     psS32           p3_version,
    4056     psS32           p2_version,
     4055    psS32           cam_version,
     4056    psS32           chip_version,
    40574057    const char      *label,
    40584058    const char      *uri,
     
    40784078 */
    40794079
    4080 long long p3ProcessedExpDelete(
     4080long long camProcessedExpDelete(
    40814081    psDB            *dbh,               ///< Database handle
    40824082    const psMetadata *where,            ///< Row match criteria
     
    40844084);
    40854085
    4086 /** Insert a single p3ProcessedExpRow object into a table
     4086/** Insert a single camProcessedExpRow object into a table
    40874087 *
    40884088 * This function constructs and inserts a single row based on it's parameters.
     
    40914091 */
    40924092
    4093 bool p3ProcessedExpInsertObject(
    4094     psDB            *dbh,               ///< Database handle
    4095     p3ProcessedExpRow *object             ///< p3ProcessedExpRow object
    4096 );
    4097 
    4098 /** Insert an array of p3ProcessedExpRow object into a table
     4093bool camProcessedExpInsertObject(
     4094    psDB            *dbh,               ///< Database handle
     4095    camProcessedExpRow *object             ///< camProcessedExpRow object
     4096);
     4097
     4098/** Insert an array of camProcessedExpRow object into a table
    40994099 *
    41004100 * This function constructs and inserts multiple rows based on it's parameters.
     
    41034103 */
    41044104
    4105 bool p3ProcessedExpInsertObjects(
    4106     psDB            *dbh,               ///< Database handle
    4107     psArray         *objects            ///< array of p3ProcessedExpRow objects
    4108 );
    4109 
    4110 /** Insert data from a binary FITS table p3ProcessedExpRow into the database
     4105bool camProcessedExpInsertObjects(
     4106    psDB            *dbh,               ///< Database handle
     4107    psArray         *objects            ///< array of camProcessedExpRow objects
     4108);
     4109
     4110/** Insert data from a binary FITS table camProcessedExpRow into the database
    41114111 *
    41124112 * This function expects a psFits object with a FITS table as the first
     
    41184118 */
    41194119
    4120 bool p3ProcessedExpInsertFits(
     4120bool camProcessedExpInsertFits(
    41214121    psDB            *dbh,               ///< Database handle
    41224122    const psFits    *fits               ///< psFits object
     
    41334133 */
    41344134
    4135 bool p3ProcessedExpSelectRowsFits(
     4135bool camProcessedExpSelectRowsFits(
    41364136    psDB            *dbh,               ///< Database handle
    41374137    psFits          *fits,              ///< psFits object
     
    41404140);
    41414141
    4142 /** Convert a p3ProcessedExpRow into an equivalent psMetadata
     4142/** Convert a camProcessedExpRow into an equivalent psMetadata
    41434143 *
    41444144 * @return A psMetadata pointer or NULL on error
    41454145 */
    41464146
    4147 psMetadata *p3ProcessedExpMetadataFromObject(
    4148     const p3ProcessedExpRow *object             ///< fooRow to convert into a psMetadata
     4147psMetadata *camProcessedExpMetadataFromObject(
     4148    const camProcessedExpRow *object             ///< fooRow to convert into a psMetadata
    41494149);
    41504150
    41514151/** Convert a psMetadata into an equivalent fooRow
    41524152 *
    4153  * @return A p3ProcessedExpRow pointer or NULL on error
    4154  */
    4155 
    4156 p3ProcessedExpRow *p3ProcessedExpObjectFromMetadata(
     4153 * @return A camProcessedExpRow pointer or NULL on error
     4154 */
     4155
     4156camProcessedExpRow *camProcessedExpObjectFromMetadata(
    41574157    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    41584158);
    4159 /** Selects up to limit rows from the database and returns as p3ProcessedExpRow objects in a psArray
     4159/** Selects up to limit rows from the database and returns as camProcessedExpRow objects in a psArray
    41604160 *
    41614161 *  See psDBSelectRows() for documentation on the format of where.
     
    41644164 */
    41654165
    4166 psArray *p3ProcessedExpSelectRowObjects(
     4166psArray *camProcessedExpSelectRowObjects(
    41674167    psDB            *dbh,               ///< Database handle
    41684168    const psMetadata *where,            ///< Row match criteria
    41694169    unsigned long long limit            ///< Maximum number of elements to return
    41704170);
    4171 /** Deletes a row from the database coresponding to an p3ProcessedExp
     4171/** Deletes a row from the database coresponding to an camProcessedExp
    41724172 *
    41734173 *  Note that a 'where' search psMetadata is constructed from each object and
     
    41774177 */
    41784178
    4179 bool p3ProcessedExpDeleteObject(
    4180     psDB            *dbh,               ///< Database handle
    4181     const p3ProcessedExpRow *object    ///< Object to delete
     4179bool camProcessedExpDeleteObject(
     4180    psDB            *dbh,               ///< Database handle
     4181    const camProcessedExpRow *object    ///< Object to delete
    41824182);
    41834183/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    41894189 */
    41904190
    4191 long long p3ProcessedExpDeleteRowObjects(
     4191long long camProcessedExpDeleteRowObjects(
    41924192    psDB            *dbh,               ///< Database handle
    41934193    const psArray   *objects,           ///< Array of objects to delete
    41944194    unsigned long long limit            ///< Maximum number of elements to delete
    41954195);
    4196 /** Formats and prints an array of p3ProcessedExpRow objects
     4196/** Formats and prints an array of camProcessedExpRow objects
    41974197 *
    41984198 * When mdcf is set the formated output is in psMetadataConfig
     
    42024202 */
    42034203
    4204 bool p3ProcessedExpPrintObjects(
     4204bool camProcessedExpPrintObjects(
    42054205    FILE            *stream,            ///< a stream
    4206     psArray         *objects,           ///< An array of p3ProcessedExpRow objects
     4206    psArray         *objects,           ///< An array of camProcessedExpRow objects
    42074207    bool            mdcf                ///< format as mdconfig or simple
    42084208);
    4209 /** Formats and prints an p3ProcessedExpRow object
     4209/** Formats and prints an camProcessedExpRow object
    42104210 *
    42114211 * When mdcf is set the formated output is in psMetadataConfig
     
    42154215 */
    42164216
    4217 bool p3ProcessedExpPrintObject(
     4217bool camProcessedExpPrintObject(
    42184218    FILE            *stream,            ///< a stream
    4219     p3ProcessedExpRow *object,    ///< an p3ProcessedExpRow object
     4219    camProcessedExpRow *object,    ///< an camProcessedExpRow object
    42204220    bool            mdcf                ///< format as mdconfig or simple
    42214221);
    4222 /** p3MaskRow data structure
    4223  *
    4224  * Structure for representing a single row of p3Mask table data.
     4222/** camMaskRow data structure
     4223 *
     4224 * Structure for representing a single row of camMask table data.
    42254225 */
    42264226
    42274227typedef struct {
    42284228    char            *label;
    4229 } p3MaskRow;
    4230 
    4231 /** Creates a new p3MaskRow object
    4232  *
    4233  *  @return A new p3MaskRow object or NULL on failure.
    4234  */
    4235 
    4236 p3MaskRow *p3MaskRowAlloc(
     4229} camMaskRow;
     4230
     4231/** Creates a new camMaskRow object
     4232 *
     4233 *  @return A new camMaskRow object or NULL on failure.
     4234 */
     4235
     4236camMaskRow *camMaskRowAlloc(
    42374237    const char      *label
    42384238);
    42394239
    4240 /** Creates a new p3Mask table
    4241  *
    4242  * @return true on success
    4243  */
    4244 
    4245 bool p3MaskCreateTable(
     4240/** Creates a new camMask table
     4241 *
     4242 * @return true on success
     4243 */
     4244
     4245bool camMaskCreateTable(
    42464246    psDB            *dbh                ///< Database handle
    42474247);
    42484248
    4249 /** Deletes a p3Mask table
    4250  *
    4251  * @return true on success
    4252  */
    4253 
    4254 bool p3MaskDropTable(
     4249/** Deletes a camMask table
     4250 *
     4251 * @return true on success
     4252 */
     4253
     4254bool camMaskDropTable(
    42554255    psDB            *dbh                ///< Database handle
    42564256);
     
    42634263 */
    42644264
    4265 bool p3MaskInsert(
     4265bool camMaskInsert(
    42664266    psDB            *dbh,               ///< Database handle
    42674267    const char      *label
     
    42734273 */
    42744274
    4275 long long p3MaskDelete(
     4275long long camMaskDelete(
    42764276    psDB            *dbh,               ///< Database handle
    42774277    const psMetadata *where,            ///< Row match criteria
     
    42794279);
    42804280
    4281 /** Insert a single p3MaskRow object into a table
     4281/** Insert a single camMaskRow object into a table
    42824282 *
    42834283 * This function constructs and inserts a single row based on it's parameters.
     
    42864286 */
    42874287
    4288 bool p3MaskInsertObject(
    4289     psDB            *dbh,               ///< Database handle
    4290     p3MaskRow       *object             ///< p3MaskRow object
    4291 );
    4292 
    4293 /** Insert an array of p3MaskRow object into a table
     4288bool camMaskInsertObject(
     4289    psDB            *dbh,               ///< Database handle
     4290    camMaskRow      *object             ///< camMaskRow object
     4291);
     4292
     4293/** Insert an array of camMaskRow object into a table
    42944294 *
    42954295 * This function constructs and inserts multiple rows based on it's parameters.
     
    42984298 */
    42994299
    4300 bool p3MaskInsertObjects(
    4301     psDB            *dbh,               ///< Database handle
    4302     psArray         *objects            ///< array of p3MaskRow objects
    4303 );
    4304 
    4305 /** Insert data from a binary FITS table p3MaskRow into the database
     4300bool camMaskInsertObjects(
     4301    psDB            *dbh,               ///< Database handle
     4302    psArray         *objects            ///< array of camMaskRow objects
     4303);
     4304
     4305/** Insert data from a binary FITS table camMaskRow into the database
    43064306 *
    43074307 * This function expects a psFits object with a FITS table as the first
     
    43134313 */
    43144314
    4315 bool p3MaskInsertFits(
     4315bool camMaskInsertFits(
    43164316    psDB            *dbh,               ///< Database handle
    43174317    const psFits    *fits               ///< psFits object
     
    43284328 */
    43294329
    4330 bool p3MaskSelectRowsFits(
     4330bool camMaskSelectRowsFits(
    43314331    psDB            *dbh,               ///< Database handle
    43324332    psFits          *fits,              ///< psFits object
     
    43354335);
    43364336
    4337 /** Convert a p3MaskRow into an equivalent psMetadata
     4337/** Convert a camMaskRow into an equivalent psMetadata
    43384338 *
    43394339 * @return A psMetadata pointer or NULL on error
    43404340 */
    43414341
    4342 psMetadata *p3MaskMetadataFromObject(
    4343     const p3MaskRow *object             ///< fooRow to convert into a psMetadata
     4342psMetadata *camMaskMetadataFromObject(
     4343    const camMaskRow *object             ///< fooRow to convert into a psMetadata
    43444344);
    43454345
    43464346/** Convert a psMetadata into an equivalent fooRow
    43474347 *
    4348  * @return A p3MaskRow pointer or NULL on error
    4349  */
    4350 
    4351 p3MaskRow *p3MaskObjectFromMetadata(
     4348 * @return A camMaskRow pointer or NULL on error
     4349 */
     4350
     4351camMaskRow *camMaskObjectFromMetadata(
    43524352    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    43534353);
    4354 /** Selects up to limit rows from the database and returns as p3MaskRow objects in a psArray
     4354/** Selects up to limit rows from the database and returns as camMaskRow objects in a psArray
    43554355 *
    43564356 *  See psDBSelectRows() for documentation on the format of where.
     
    43594359 */
    43604360
    4361 psArray *p3MaskSelectRowObjects(
     4361psArray *camMaskSelectRowObjects(
    43624362    psDB            *dbh,               ///< Database handle
    43634363    const psMetadata *where,            ///< Row match criteria
    43644364    unsigned long long limit            ///< Maximum number of elements to return
    43654365);
    4366 /** Deletes a row from the database coresponding to an p3Mask
     4366/** Deletes a row from the database coresponding to an camMask
    43674367 *
    43684368 *  Note that a 'where' search psMetadata is constructed from each object and
     
    43724372 */
    43734373
    4374 bool p3MaskDeleteObject(
    4375     psDB            *dbh,               ///< Database handle
    4376     const p3MaskRow *object    ///< Object to delete
     4374bool camMaskDeleteObject(
     4375    psDB            *dbh,               ///< Database handle
     4376    const camMaskRow *object    ///< Object to delete
    43774377);
    43784378/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    43844384 */
    43854385
    4386 long long p3MaskDeleteRowObjects(
     4386long long camMaskDeleteRowObjects(
    43874387    psDB            *dbh,               ///< Database handle
    43884388    const psArray   *objects,           ///< Array of objects to delete
    43894389    unsigned long long limit            ///< Maximum number of elements to delete
    43904390);
    4391 /** Formats and prints an array of p3MaskRow objects
     4391/** Formats and prints an array of camMaskRow objects
    43924392 *
    43934393 * When mdcf is set the formated output is in psMetadataConfig
     
    43974397 */
    43984398
    4399 bool p3MaskPrintObjects(
     4399bool camMaskPrintObjects(
    44004400    FILE            *stream,            ///< a stream
    4401     psArray         *objects,           ///< An array of p3MaskRow objects
     4401    psArray         *objects,           ///< An array of camMaskRow objects
    44024402    bool            mdcf                ///< format as mdconfig or simple
    44034403);
    4404 /** Formats and prints an p3MaskRow object
     4404/** Formats and prints an camMaskRow object
    44054405 *
    44064406 * When mdcf is set the formated output is in psMetadataConfig
     
    44104410 */
    44114411
    4412 bool p3MaskPrintObject(
     4412bool camMaskPrintObject(
    44134413    FILE            *stream,            ///< a stream
    4414     p3MaskRow *object,    ///< an p3MaskRow object
     4414    camMaskRow *object,    ///< an camMaskRow object
    44154415    bool            mdcf                ///< format as mdconfig or simple
    44164416);
     
    68696869    bool            mdcf                ///< format as mdconfig or simple
    68706870);
    6871 /** p4RunRow data structure
    6872  *
    6873  * Structure for representing a single row of p4Run table data.
     6871/** warpRunRow data structure
     6872 *
     6873 * Structure for representing a single row of warpRun table data.
    68746874 */
    68756875
    68766876typedef struct {
    6877     psS32           p4_id;
     6877    psS32           warp_id;
    68786878    char            *mode;
    68796879    char            *state;
     
    68816881    char            *dvodb;
    68826882    psTime*         registered;
    6883 } p4RunRow;
    6884 
    6885 /** Creates a new p4RunRow object
    6886  *
    6887  *  @return A new p4RunRow object or NULL on failure.
    6888  */
    6889 
    6890 p4RunRow *p4RunRowAlloc(
    6891     psS32           p4_id,
     6883} warpRunRow;
     6884
     6885/** Creates a new warpRunRow object
     6886 *
     6887 *  @return A new warpRunRow object or NULL on failure.
     6888 */
     6889
     6890warpRunRow *warpRunRowAlloc(
     6891    psS32           warp_id,
    68926892    const char      *mode,
    68936893    const char      *state,
     
    68976897);
    68986898
    6899 /** Creates a new p4Run table
    6900  *
    6901  * @return true on success
    6902  */
    6903 
    6904 bool p4RunCreateTable(
     6899/** Creates a new warpRun table
     6900 *
     6901 * @return true on success
     6902 */
     6903
     6904bool warpRunCreateTable(
    69056905    psDB            *dbh                ///< Database handle
    69066906);
    69076907
    6908 /** Deletes a p4Run table
    6909  *
    6910  * @return true on success
    6911  */
    6912 
    6913 bool p4RunDropTable(
     6908/** Deletes a warpRun table
     6909 *
     6910 * @return true on success
     6911 */
     6912
     6913bool warpRunDropTable(
    69146914    psDB            *dbh                ///< Database handle
    69156915);
     
    69226922 */
    69236923
    6924 bool p4RunInsert(
    6925     psDB            *dbh,               ///< Database handle
    6926     psS32           p4_id,
     6924bool warpRunInsert(
     6925    psDB            *dbh,               ///< Database handle
     6926    psS32           warp_id,
    69276927    const char      *mode,
    69286928    const char      *state,
     
    69376937 */
    69386938
    6939 long long p4RunDelete(
     6939long long warpRunDelete(
    69406940    psDB            *dbh,               ///< Database handle
    69416941    const psMetadata *where,            ///< Row match criteria
     
    69436943);
    69446944
    6945 /** Insert a single p4RunRow object into a table
     6945/** Insert a single warpRunRow object into a table
    69466946 *
    69476947 * This function constructs and inserts a single row based on it's parameters.
     
    69506950 */
    69516951
    6952 bool p4RunInsertObject(
    6953     psDB            *dbh,               ///< Database handle
    6954     p4RunRow        *object             ///< p4RunRow object
    6955 );
    6956 
    6957 /** Insert an array of p4RunRow object into a table
     6952bool warpRunInsertObject(
     6953    psDB            *dbh,               ///< Database handle
     6954    warpRunRow      *object             ///< warpRunRow object
     6955);
     6956
     6957/** Insert an array of warpRunRow object into a table
    69586958 *
    69596959 * This function constructs and inserts multiple rows based on it's parameters.
     
    69626962 */
    69636963
    6964 bool p4RunInsertObjects(
    6965     psDB            *dbh,               ///< Database handle
    6966     psArray         *objects            ///< array of p4RunRow objects
    6967 );
    6968 
    6969 /** Insert data from a binary FITS table p4RunRow into the database
     6964bool warpRunInsertObjects(
     6965    psDB            *dbh,               ///< Database handle
     6966    psArray         *objects            ///< array of warpRunRow objects
     6967);
     6968
     6969/** Insert data from a binary FITS table warpRunRow into the database
    69706970 *
    69716971 * This function expects a psFits object with a FITS table as the first
     
    69776977 */
    69786978
    6979 bool p4RunInsertFits(
     6979bool warpRunInsertFits(
    69806980    psDB            *dbh,               ///< Database handle
    69816981    const psFits    *fits               ///< psFits object
     
    69926992 */
    69936993
    6994 bool p4RunSelectRowsFits(
     6994bool warpRunSelectRowsFits(
    69956995    psDB            *dbh,               ///< Database handle
    69966996    psFits          *fits,              ///< psFits object
     
    69996999);
    70007000
    7001 /** Convert a p4RunRow into an equivalent psMetadata
     7001/** Convert a warpRunRow into an equivalent psMetadata
    70027002 *
    70037003 * @return A psMetadata pointer or NULL on error
    70047004 */
    70057005
    7006 psMetadata *p4RunMetadataFromObject(
    7007     const p4RunRow *object             ///< fooRow to convert into a psMetadata
     7006psMetadata *warpRunMetadataFromObject(
     7007    const warpRunRow *object             ///< fooRow to convert into a psMetadata
    70087008);
    70097009
    70107010/** Convert a psMetadata into an equivalent fooRow
    70117011 *
    7012  * @return A p4RunRow pointer or NULL on error
    7013  */
    7014 
    7015 p4RunRow *p4RunObjectFromMetadata(
     7012 * @return A warpRunRow pointer or NULL on error
     7013 */
     7014
     7015warpRunRow *warpRunObjectFromMetadata(
    70167016    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    70177017);
    7018 /** Selects up to limit rows from the database and returns as p4RunRow objects in a psArray
     7018/** Selects up to limit rows from the database and returns as warpRunRow objects in a psArray
    70197019 *
    70207020 *  See psDBSelectRows() for documentation on the format of where.
     
    70237023 */
    70247024
    7025 psArray *p4RunSelectRowObjects(
     7025psArray *warpRunSelectRowObjects(
    70267026    psDB            *dbh,               ///< Database handle
    70277027    const psMetadata *where,            ///< Row match criteria
    70287028    unsigned long long limit            ///< Maximum number of elements to return
    70297029);
    7030 /** Deletes a row from the database coresponding to an p4Run
     7030/** Deletes a row from the database coresponding to an warpRun
    70317031 *
    70327032 *  Note that a 'where' search psMetadata is constructed from each object and
     
    70367036 */
    70377037
    7038 bool p4RunDeleteObject(
    7039     psDB            *dbh,               ///< Database handle
    7040     const p4RunRow *object    ///< Object to delete
     7038bool warpRunDeleteObject(
     7039    psDB            *dbh,               ///< Database handle
     7040    const warpRunRow *object    ///< Object to delete
    70417041);
    70427042/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    70487048 */
    70497049
    7050 long long p4RunDeleteRowObjects(
     7050long long warpRunDeleteRowObjects(
    70517051    psDB            *dbh,               ///< Database handle
    70527052    const psArray   *objects,           ///< Array of objects to delete
    70537053    unsigned long long limit            ///< Maximum number of elements to delete
    70547054);
    7055 /** Formats and prints an array of p4RunRow objects
     7055/** Formats and prints an array of warpRunRow objects
    70567056 *
    70577057 * When mdcf is set the formated output is in psMetadataConfig
     
    70617061 */
    70627062
    7063 bool p4RunPrintObjects(
     7063bool warpRunPrintObjects(
    70647064    FILE            *stream,            ///< a stream
    7065     psArray         *objects,           ///< An array of p4RunRow objects
     7065    psArray         *objects,           ///< An array of warpRunRow objects
    70667066    bool            mdcf                ///< format as mdconfig or simple
    70677067);
    7068 /** Formats and prints an p4RunRow object
     7068/** Formats and prints an warpRunRow object
    70697069 *
    70707070 * When mdcf is set the formated output is in psMetadataConfig
     
    70747074 */
    70757075
    7076 bool p4RunPrintObject(
     7076bool warpRunPrintObject(
    70777077    FILE            *stream,            ///< a stream
    7078     p4RunRow *object,    ///< an p4RunRow object
     7078    warpRunRow *object,    ///< an warpRunRow object
    70797079    bool            mdcf                ///< format as mdconfig or simple
    70807080);
    7081 /** p4InputExpRow data structure
    7082  *
    7083  * Structure for representing a single row of p4InputExp table data.
     7081/** warpInputExpRow data structure
     7082 *
     7083 * Structure for representing a single row of warpInputExp table data.
    70847084 */
    70857085
    70867086typedef struct {
    7087     psS32           p4_id;
     7087    psS32           warp_id;
    70887088    char            *exp_tag;
    7089     psS32           p3_version;
     7089    psS32           cam_version;
    70907090    bool            magiced;
    7091 } p4InputExpRow;
    7092 
    7093 /** Creates a new p4InputExpRow object
    7094  *
    7095  *  @return A new p4InputExpRow object or NULL on failure.
    7096  */
    7097 
    7098 p4InputExpRow *p4InputExpRowAlloc(
    7099     psS32           p4_id,
     7091} warpInputExpRow;
     7092
     7093/** Creates a new warpInputExpRow object
     7094 *
     7095 *  @return A new warpInputExpRow object or NULL on failure.
     7096 */
     7097
     7098warpInputExpRow *warpInputExpRowAlloc(
     7099    psS32           warp_id,
    71007100    const char      *exp_tag,
    7101     psS32           p3_version,
     7101    psS32           cam_version,
    71027102    bool            magiced
    71037103);
    71047104
    7105 /** Creates a new p4InputExp table
    7106  *
    7107  * @return true on success
    7108  */
    7109 
    7110 bool p4InputExpCreateTable(
     7105/** Creates a new warpInputExp table
     7106 *
     7107 * @return true on success
     7108 */
     7109
     7110bool warpInputExpCreateTable(
    71117111    psDB            *dbh                ///< Database handle
    71127112);
    71137113
    7114 /** Deletes a p4InputExp table
    7115  *
    7116  * @return true on success
    7117  */
    7118 
    7119 bool p4InputExpDropTable(
     7114/** Deletes a warpInputExp table
     7115 *
     7116 * @return true on success
     7117 */
     7118
     7119bool warpInputExpDropTable(
    71207120    psDB            *dbh                ///< Database handle
    71217121);
     
    71287128 */
    71297129
    7130 bool p4InputExpInsert(
    7131     psDB            *dbh,               ///< Database handle
    7132     psS32           p4_id,
     7130bool warpInputExpInsert(
     7131    psDB            *dbh,               ///< Database handle
     7132    psS32           warp_id,
    71337133    const char      *exp_tag,
    7134     psS32           p3_version,
     7134    psS32           cam_version,
    71357135    bool            magiced
    71367136);
     
    71417141 */
    71427142
    7143 long long p4InputExpDelete(
     7143long long warpInputExpDelete(
    71447144    psDB            *dbh,               ///< Database handle
    71457145    const psMetadata *where,            ///< Row match criteria
     
    71477147);
    71487148
    7149 /** Insert a single p4InputExpRow object into a table
     7149/** Insert a single warpInputExpRow object into a table
    71507150 *
    71517151 * This function constructs and inserts a single row based on it's parameters.
     
    71547154 */
    71557155
    7156 bool p4InputExpInsertObject(
    7157     psDB            *dbh,               ///< Database handle
    7158     p4InputExpRow   *object             ///< p4InputExpRow object
    7159 );
    7160 
    7161 /** Insert an array of p4InputExpRow object into a table
     7156bool warpInputExpInsertObject(
     7157    psDB            *dbh,               ///< Database handle
     7158    warpInputExpRow *object             ///< warpInputExpRow object
     7159);
     7160
     7161/** Insert an array of warpInputExpRow object into a table
    71627162 *
    71637163 * This function constructs and inserts multiple rows based on it's parameters.
     
    71667166 */
    71677167
    7168 bool p4InputExpInsertObjects(
    7169     psDB            *dbh,               ///< Database handle
    7170     psArray         *objects            ///< array of p4InputExpRow objects
    7171 );
    7172 
    7173 /** Insert data from a binary FITS table p4InputExpRow into the database
     7168bool warpInputExpInsertObjects(
     7169    psDB            *dbh,               ///< Database handle
     7170    psArray         *objects            ///< array of warpInputExpRow objects
     7171);
     7172
     7173/** Insert data from a binary FITS table warpInputExpRow into the database
    71747174 *
    71757175 * This function expects a psFits object with a FITS table as the first
     
    71817181 */
    71827182
    7183 bool p4InputExpInsertFits(
     7183bool warpInputExpInsertFits(
    71847184    psDB            *dbh,               ///< Database handle
    71857185    const psFits    *fits               ///< psFits object
     
    71967196 */
    71977197
    7198 bool p4InputExpSelectRowsFits(
     7198bool warpInputExpSelectRowsFits(
    71997199    psDB            *dbh,               ///< Database handle
    72007200    psFits          *fits,              ///< psFits object
     
    72037203);
    72047204
    7205 /** Convert a p4InputExpRow into an equivalent psMetadata
     7205/** Convert a warpInputExpRow into an equivalent psMetadata
    72067206 *
    72077207 * @return A psMetadata pointer or NULL on error
    72087208 */
    72097209
    7210 psMetadata *p4InputExpMetadataFromObject(
    7211     const p4InputExpRow *object             ///< fooRow to convert into a psMetadata
     7210psMetadata *warpInputExpMetadataFromObject(
     7211    const warpInputExpRow *object             ///< fooRow to convert into a psMetadata
    72127212);
    72137213
    72147214/** Convert a psMetadata into an equivalent fooRow
    72157215 *
    7216  * @return A p4InputExpRow pointer or NULL on error
    7217  */
    7218 
    7219 p4InputExpRow *p4InputExpObjectFromMetadata(
     7216 * @return A warpInputExpRow pointer or NULL on error
     7217 */
     7218
     7219warpInputExpRow *warpInputExpObjectFromMetadata(
    72207220    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    72217221);
    7222 /** Selects up to limit rows from the database and returns as p4InputExpRow objects in a psArray
     7222/** Selects up to limit rows from the database and returns as warpInputExpRow objects in a psArray
    72237223 *
    72247224 *  See psDBSelectRows() for documentation on the format of where.
     
    72277227 */
    72287228
    7229 psArray *p4InputExpSelectRowObjects(
     7229psArray *warpInputExpSelectRowObjects(
    72307230    psDB            *dbh,               ///< Database handle
    72317231    const psMetadata *where,            ///< Row match criteria
    72327232    unsigned long long limit            ///< Maximum number of elements to return
    72337233);
    7234 /** Deletes a row from the database coresponding to an p4InputExp
     7234/** Deletes a row from the database coresponding to an warpInputExp
    72357235 *
    72367236 *  Note that a 'where' search psMetadata is constructed from each object and
     
    72407240 */
    72417241
    7242 bool p4InputExpDeleteObject(
    7243     psDB            *dbh,               ///< Database handle
    7244     const p4InputExpRow *object    ///< Object to delete
     7242bool warpInputExpDeleteObject(
     7243    psDB            *dbh,               ///< Database handle
     7244    const warpInputExpRow *object    ///< Object to delete
    72457245);
    72467246/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    72527252 */
    72537253
    7254 long long p4InputExpDeleteRowObjects(
     7254long long warpInputExpDeleteRowObjects(
    72557255    psDB            *dbh,               ///< Database handle
    72567256    const psArray   *objects,           ///< Array of objects to delete
    72577257    unsigned long long limit            ///< Maximum number of elements to delete
    72587258);
    7259 /** Formats and prints an array of p4InputExpRow objects
     7259/** Formats and prints an array of warpInputExpRow objects
    72607260 *
    72617261 * When mdcf is set the formated output is in psMetadataConfig
     
    72657265 */
    72667266
    7267 bool p4InputExpPrintObjects(
     7267bool warpInputExpPrintObjects(
    72687268    FILE            *stream,            ///< a stream
    7269     psArray         *objects,           ///< An array of p4InputExpRow objects
     7269    psArray         *objects,           ///< An array of warpInputExpRow objects
    72707270    bool            mdcf                ///< format as mdconfig or simple
    72717271);
    7272 /** Formats and prints an p4InputExpRow object
     7272/** Formats and prints an warpInputExpRow object
    72737273 *
    72747274 * When mdcf is set the formated output is in psMetadataConfig
     
    72787278 */
    72797279
    7280 bool p4InputExpPrintObject(
     7280bool warpInputExpPrintObject(
    72817281    FILE            *stream,            ///< a stream
    7282     p4InputExpRow *object,    ///< an p4InputExpRow object
     7282    warpInputExpRow *object,    ///< an warpInputExpRow object
    72837283    bool            mdcf                ///< format as mdconfig or simple
    72847284);
    7285 /** p4SkyCellMapRow data structure
    7286  *
    7287  * Structure for representing a single row of p4SkyCellMap table data.
     7285/** warpSkyCellMapRow data structure
     7286 *
     7287 * Structure for representing a single row of warpSkyCellMap table data.
    72887288 */
    72897289
    72907290typedef struct {
    7291     psS32           p4_id;
     7291    psS32           warp_id;
    72927292    char            *skycell_id;
    72937293    char            *tess_id;
    72947294    char            *exp_tag;
    7295     psS32           p3_version;
     7295    psS32           cam_version;
    72967296    char            *class_id;
    7297 } p4SkyCellMapRow;
    7298 
    7299 /** Creates a new p4SkyCellMapRow object
    7300  *
    7301  *  @return A new p4SkyCellMapRow object or NULL on failure.
    7302  */
    7303 
    7304 p4SkyCellMapRow *p4SkyCellMapRowAlloc(
    7305     psS32           p4_id,
     7297} warpSkyCellMapRow;
     7298
     7299/** Creates a new warpSkyCellMapRow object
     7300 *
     7301 *  @return A new warpSkyCellMapRow object or NULL on failure.
     7302 */
     7303
     7304warpSkyCellMapRow *warpSkyCellMapRowAlloc(
     7305    psS32           warp_id,
    73067306    const char      *skycell_id,
    73077307    const char      *tess_id,
    73087308    const char      *exp_tag,
    7309     psS32           p3_version,
     7309    psS32           cam_version,
    73107310    const char      *class_id
    73117311);
    73127312
    7313 /** Creates a new p4SkyCellMap table
    7314  *
    7315  * @return true on success
    7316  */
    7317 
    7318 bool p4SkyCellMapCreateTable(
     7313/** Creates a new warpSkyCellMap table
     7314 *
     7315 * @return true on success
     7316 */
     7317
     7318bool warpSkyCellMapCreateTable(
    73197319    psDB            *dbh                ///< Database handle
    73207320);
    73217321
    7322 /** Deletes a p4SkyCellMap table
    7323  *
    7324  * @return true on success
    7325  */
    7326 
    7327 bool p4SkyCellMapDropTable(
     7322/** Deletes a warpSkyCellMap table
     7323 *
     7324 * @return true on success
     7325 */
     7326
     7327bool warpSkyCellMapDropTable(
    73287328    psDB            *dbh                ///< Database handle
    73297329);
     
    73367336 */
    73377337
    7338 bool p4SkyCellMapInsert(
    7339     psDB            *dbh,               ///< Database handle
    7340     psS32           p4_id,
     7338bool warpSkyCellMapInsert(
     7339    psDB            *dbh,               ///< Database handle
     7340    psS32           warp_id,
    73417341    const char      *skycell_id,
    73427342    const char      *tess_id,
    73437343    const char      *exp_tag,
    7344     psS32           p3_version,
     7344    psS32           cam_version,
    73457345    const char      *class_id
    73467346);
     
    73517351 */
    73527352
    7353 long long p4SkyCellMapDelete(
     7353long long warpSkyCellMapDelete(
    73547354    psDB            *dbh,               ///< Database handle
    73557355    const psMetadata *where,            ///< Row match criteria
     
    73577357);
    73587358
    7359 /** Insert a single p4SkyCellMapRow object into a table
     7359/** Insert a single warpSkyCellMapRow object into a table
    73607360 *
    73617361 * This function constructs and inserts a single row based on it's parameters.
     
    73647364 */
    73657365
    7366 bool p4SkyCellMapInsertObject(
    7367     psDB            *dbh,               ///< Database handle
    7368     p4SkyCellMapRow *object             ///< p4SkyCellMapRow object
    7369 );
    7370 
    7371 /** Insert an array of p4SkyCellMapRow object into a table
     7366bool warpSkyCellMapInsertObject(
     7367    psDB            *dbh,               ///< Database handle
     7368    warpSkyCellMapRow *object             ///< warpSkyCellMapRow object
     7369);
     7370
     7371/** Insert an array of warpSkyCellMapRow object into a table
    73727372 *
    73737373 * This function constructs and inserts multiple rows based on it's parameters.
     
    73767376 */
    73777377
    7378 bool p4SkyCellMapInsertObjects(
    7379     psDB            *dbh,               ///< Database handle
    7380     psArray         *objects            ///< array of p4SkyCellMapRow objects
    7381 );
    7382 
    7383 /** Insert data from a binary FITS table p4SkyCellMapRow into the database
     7378bool warpSkyCellMapInsertObjects(
     7379    psDB            *dbh,               ///< Database handle
     7380    psArray         *objects            ///< array of warpSkyCellMapRow objects
     7381);
     7382
     7383/** Insert data from a binary FITS table warpSkyCellMapRow into the database
    73847384 *
    73857385 * This function expects a psFits object with a FITS table as the first
     
    73917391 */
    73927392
    7393 bool p4SkyCellMapInsertFits(
     7393bool warpSkyCellMapInsertFits(
    73947394    psDB            *dbh,               ///< Database handle
    73957395    const psFits    *fits               ///< psFits object
     
    74067406 */
    74077407
    7408 bool p4SkyCellMapSelectRowsFits(
     7408bool warpSkyCellMapSelectRowsFits(
    74097409    psDB            *dbh,               ///< Database handle
    74107410    psFits          *fits,              ///< psFits object
     
    74137413);
    74147414
    7415 /** Convert a p4SkyCellMapRow into an equivalent psMetadata
     7415/** Convert a warpSkyCellMapRow into an equivalent psMetadata
    74167416 *
    74177417 * @return A psMetadata pointer or NULL on error
    74187418 */
    74197419
    7420 psMetadata *p4SkyCellMapMetadataFromObject(
    7421     const p4SkyCellMapRow *object             ///< fooRow to convert into a psMetadata
     7420psMetadata *warpSkyCellMapMetadataFromObject(
     7421    const warpSkyCellMapRow *object             ///< fooRow to convert into a psMetadata
    74227422);
    74237423
    74247424/** Convert a psMetadata into an equivalent fooRow
    74257425 *
    7426  * @return A p4SkyCellMapRow pointer or NULL on error
    7427  */
    7428 
    7429 p4SkyCellMapRow *p4SkyCellMapObjectFromMetadata(
     7426 * @return A warpSkyCellMapRow pointer or NULL on error
     7427 */
     7428
     7429warpSkyCellMapRow *warpSkyCellMapObjectFromMetadata(
    74307430    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    74317431);
    7432 /** Selects up to limit rows from the database and returns as p4SkyCellMapRow objects in a psArray
     7432/** Selects up to limit rows from the database and returns as warpSkyCellMapRow objects in a psArray
    74337433 *
    74347434 *  See psDBSelectRows() for documentation on the format of where.
     
    74377437 */
    74387438
    7439 psArray *p4SkyCellMapSelectRowObjects(
     7439psArray *warpSkyCellMapSelectRowObjects(
    74407440    psDB            *dbh,               ///< Database handle
    74417441    const psMetadata *where,            ///< Row match criteria
    74427442    unsigned long long limit            ///< Maximum number of elements to return
    74437443);
    7444 /** Deletes a row from the database coresponding to an p4SkyCellMap
     7444/** Deletes a row from the database coresponding to an warpSkyCellMap
    74457445 *
    74467446 *  Note that a 'where' search psMetadata is constructed from each object and
     
    74507450 */
    74517451
    7452 bool p4SkyCellMapDeleteObject(
    7453     psDB            *dbh,               ///< Database handle
    7454     const p4SkyCellMapRow *object    ///< Object to delete
     7452bool warpSkyCellMapDeleteObject(
     7453    psDB            *dbh,               ///< Database handle
     7454    const warpSkyCellMapRow *object    ///< Object to delete
    74557455);
    74567456/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    74627462 */
    74637463
    7464 long long p4SkyCellMapDeleteRowObjects(
     7464long long warpSkyCellMapDeleteRowObjects(
    74657465    psDB            *dbh,               ///< Database handle
    74667466    const psArray   *objects,           ///< Array of objects to delete
    74677467    unsigned long long limit            ///< Maximum number of elements to delete
    74687468);
    7469 /** Formats and prints an array of p4SkyCellMapRow objects
     7469/** Formats and prints an array of warpSkyCellMapRow objects
    74707470 *
    74717471 * When mdcf is set the formated output is in psMetadataConfig
     
    74757475 */
    74767476
    7477 bool p4SkyCellMapPrintObjects(
     7477bool warpSkyCellMapPrintObjects(
    74787478    FILE            *stream,            ///< a stream
    7479     psArray         *objects,           ///< An array of p4SkyCellMapRow objects
     7479    psArray         *objects,           ///< An array of warpSkyCellMapRow objects
    74807480    bool            mdcf                ///< format as mdconfig or simple
    74817481);
    7482 /** Formats and prints an p4SkyCellMapRow object
     7482/** Formats and prints an warpSkyCellMapRow object
    74837483 *
    74847484 * When mdcf is set the formated output is in psMetadataConfig
     
    74887488 */
    74897489
    7490 bool p4SkyCellMapPrintObject(
     7490bool warpSkyCellMapPrintObject(
    74917491    FILE            *stream,            ///< a stream
    7492     p4SkyCellMapRow *object,    ///< an p4SkyCellMapRow object
     7492    warpSkyCellMapRow *object,    ///< an warpSkyCellMapRow object
    74937493    bool            mdcf                ///< format as mdconfig or simple
    74947494);
    7495 /** p4SkyfileRow data structure
    7496  *
    7497  * Structure for representing a single row of p4Skyfile table data.
     7495/** warpSkyfileRow data structure
     7496 *
     7497 * Structure for representing a single row of warpSkyfile table data.
    74987498 */
    74997499
    75007500typedef struct {
    7501     psS32           p4_id;
     7501    psS32           warp_id;
    75027502    char            *skycell_id;
    75037503    char            *tess_id;
     
    75057505    psF64           bg;
    75067506    psF64           bg_mean_stdev;
    7507 } p4SkyfileRow;
    7508 
    7509 /** Creates a new p4SkyfileRow object
    7510  *
    7511  *  @return A new p4SkyfileRow object or NULL on failure.
    7512  */
    7513 
    7514 p4SkyfileRow *p4SkyfileRowAlloc(
    7515     psS32           p4_id,
     7507} warpSkyfileRow;
     7508
     7509/** Creates a new warpSkyfileRow object
     7510 *
     7511 *  @return A new warpSkyfileRow object or NULL on failure.
     7512 */
     7513
     7514warpSkyfileRow *warpSkyfileRowAlloc(
     7515    psS32           warp_id,
    75167516    const char      *skycell_id,
    75177517    const char      *tess_id,
     
    75217521);
    75227522
    7523 /** Creates a new p4Skyfile table
    7524  *
    7525  * @return true on success
    7526  */
    7527 
    7528 bool p4SkyfileCreateTable(
     7523/** Creates a new warpSkyfile table
     7524 *
     7525 * @return true on success
     7526 */
     7527
     7528bool warpSkyfileCreateTable(
    75297529    psDB            *dbh                ///< Database handle
    75307530);
    75317531
    7532 /** Deletes a p4Skyfile table
    7533  *
    7534  * @return true on success
    7535  */
    7536 
    7537 bool p4SkyfileDropTable(
     7532/** Deletes a warpSkyfile table
     7533 *
     7534 * @return true on success
     7535 */
     7536
     7537bool warpSkyfileDropTable(
    75387538    psDB            *dbh                ///< Database handle
    75397539);
     
    75467546 */
    75477547
    7548 bool p4SkyfileInsert(
    7549     psDB            *dbh,               ///< Database handle
    7550     psS32           p4_id,
     7548bool warpSkyfileInsert(
     7549    psDB            *dbh,               ///< Database handle
     7550    psS32           warp_id,
    75517551    const char      *skycell_id,
    75527552    const char      *tess_id,
     
    75617561 */
    75627562
    7563 long long p4SkyfileDelete(
     7563long long warpSkyfileDelete(
    75647564    psDB            *dbh,               ///< Database handle
    75657565    const psMetadata *where,            ///< Row match criteria
     
    75677567);
    75687568
    7569 /** Insert a single p4SkyfileRow object into a table
     7569/** Insert a single warpSkyfileRow object into a table
    75707570 *
    75717571 * This function constructs and inserts a single row based on it's parameters.
     
    75747574 */
    75757575
    7576 bool p4SkyfileInsertObject(
    7577     psDB            *dbh,               ///< Database handle
    7578     p4SkyfileRow    *object             ///< p4SkyfileRow object
    7579 );
    7580 
    7581 /** Insert an array of p4SkyfileRow object into a table
     7576bool warpSkyfileInsertObject(
     7577    psDB            *dbh,               ///< Database handle
     7578    warpSkyfileRow  *object             ///< warpSkyfileRow object
     7579);
     7580
     7581/** Insert an array of warpSkyfileRow object into a table
    75827582 *
    75837583 * This function constructs and inserts multiple rows based on it's parameters.
     
    75867586 */
    75877587
    7588 bool p4SkyfileInsertObjects(
    7589     psDB            *dbh,               ///< Database handle
    7590     psArray         *objects            ///< array of p4SkyfileRow objects
    7591 );
    7592 
    7593 /** Insert data from a binary FITS table p4SkyfileRow into the database
     7588bool warpSkyfileInsertObjects(
     7589    psDB            *dbh,               ///< Database handle
     7590    psArray         *objects            ///< array of warpSkyfileRow objects
     7591);
     7592
     7593/** Insert data from a binary FITS table warpSkyfileRow into the database
    75947594 *
    75957595 * This function expects a psFits object with a FITS table as the first
     
    76017601 */
    76027602
    7603 bool p4SkyfileInsertFits(
     7603bool warpSkyfileInsertFits(
    76047604    psDB            *dbh,               ///< Database handle
    76057605    const psFits    *fits               ///< psFits object
     
    76167616 */
    76177617
    7618 bool p4SkyfileSelectRowsFits(
     7618bool warpSkyfileSelectRowsFits(
    76197619    psDB            *dbh,               ///< Database handle
    76207620    psFits          *fits,              ///< psFits object
     
    76237623);
    76247624
    7625 /** Convert a p4SkyfileRow into an equivalent psMetadata
     7625/** Convert a warpSkyfileRow into an equivalent psMetadata
    76267626 *
    76277627 * @return A psMetadata pointer or NULL on error
    76287628 */
    76297629
    7630 psMetadata *p4SkyfileMetadataFromObject(
    7631     const p4SkyfileRow *object             ///< fooRow to convert into a psMetadata
     7630psMetadata *warpSkyfileMetadataFromObject(
     7631    const warpSkyfileRow *object             ///< fooRow to convert into a psMetadata
    76327632);
    76337633
    76347634/** Convert a psMetadata into an equivalent fooRow
    76357635 *
    7636  * @return A p4SkyfileRow pointer or NULL on error
    7637  */
    7638 
    7639 p4SkyfileRow *p4SkyfileObjectFromMetadata(
     7636 * @return A warpSkyfileRow pointer or NULL on error
     7637 */
     7638
     7639warpSkyfileRow *warpSkyfileObjectFromMetadata(
    76407640    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    76417641);
    7642 /** Selects up to limit rows from the database and returns as p4SkyfileRow objects in a psArray
     7642/** Selects up to limit rows from the database and returns as warpSkyfileRow objects in a psArray
    76437643 *
    76447644 *  See psDBSelectRows() for documentation on the format of where.
     
    76477647 */
    76487648
    7649 psArray *p4SkyfileSelectRowObjects(
     7649psArray *warpSkyfileSelectRowObjects(
    76507650    psDB            *dbh,               ///< Database handle
    76517651    const psMetadata *where,            ///< Row match criteria
    76527652    unsigned long long limit            ///< Maximum number of elements to return
    76537653);
    7654 /** Deletes a row from the database coresponding to an p4Skyfile
     7654/** Deletes a row from the database coresponding to an warpSkyfile
    76557655 *
    76567656 *  Note that a 'where' search psMetadata is constructed from each object and
     
    76607660 */
    76617661
    7662 bool p4SkyfileDeleteObject(
    7663     psDB            *dbh,               ///< Database handle
    7664     const p4SkyfileRow *object    ///< Object to delete
     7662bool warpSkyfileDeleteObject(
     7663    psDB            *dbh,               ///< Database handle
     7664    const warpSkyfileRow *object    ///< Object to delete
    76657665);
    76667666/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    76727672 */
    76737673
    7674 long long p4SkyfileDeleteRowObjects(
     7674long long warpSkyfileDeleteRowObjects(
    76757675    psDB            *dbh,               ///< Database handle
    76767676    const psArray   *objects,           ///< Array of objects to delete
    76777677    unsigned long long limit            ///< Maximum number of elements to delete
    76787678);
    7679 /** Formats and prints an array of p4SkyfileRow objects
     7679/** Formats and prints an array of warpSkyfileRow objects
    76807680 *
    76817681 * When mdcf is set the formated output is in psMetadataConfig
     
    76857685 */
    76867686
    7687 bool p4SkyfilePrintObjects(
     7687bool warpSkyfilePrintObjects(
    76887688    FILE            *stream,            ///< a stream
    7689     psArray         *objects,           ///< An array of p4SkyfileRow objects
     7689    psArray         *objects,           ///< An array of warpSkyfileRow objects
    76907690    bool            mdcf                ///< format as mdconfig or simple
    76917691);
    7692 /** Formats and prints an p4SkyfileRow object
     7692/** Formats and prints an warpSkyfileRow object
    76937693 *
    76947694 * When mdcf is set the formated output is in psMetadataConfig
     
    76987698 */
    76997699
    7700 bool p4SkyfilePrintObject(
     7700bool warpSkyfilePrintObject(
    77017701    FILE            *stream,            ///< a stream
    7702     p4SkyfileRow *object,    ///< an p4SkyfileRow object
     7702    warpSkyfileRow *object,    ///< an warpSkyfileRow object
    77037703    bool            mdcf                ///< format as mdconfig or simple
    77047704);
    7705 /** p5RunRow data structure
    7706  *
    7707  * Structure for representing a single row of p5Run table data.
     7705/** diffRunRow data structure
     7706 *
     7707 * Structure for representing a single row of diffRun table data.
    77087708 */
    77097709
    77107710typedef struct {
    7711     psS32           p5_id;
     7711    psS32           diff_id;
    77127712    char            *state;
    77137713    char            *workdir;
     
    77167716    char            *skycell_id;
    77177717    char            *tess_id;
    7718 } p5RunRow;
    7719 
    7720 /** Creates a new p5RunRow object
    7721  *
    7722  *  @return A new p5RunRow object or NULL on failure.
    7723  */
    7724 
    7725 p5RunRow *p5RunRowAlloc(
    7726     psS32           p5_id,
     7718} diffRunRow;
     7719
     7720/** Creates a new diffRunRow object
     7721 *
     7722 *  @return A new diffRunRow object or NULL on failure.
     7723 */
     7724
     7725diffRunRow *diffRunRowAlloc(
     7726    psS32           diff_id,
    77277727    const char      *state,
    77287728    const char      *workdir,
     
    77337733);
    77347734
    7735 /** Creates a new p5Run table
    7736  *
    7737  * @return true on success
    7738  */
    7739 
    7740 bool p5RunCreateTable(
     7735/** Creates a new diffRun table
     7736 *
     7737 * @return true on success
     7738 */
     7739
     7740bool diffRunCreateTable(
    77417741    psDB            *dbh                ///< Database handle
    77427742);
    77437743
    7744 /** Deletes a p5Run table
    7745  *
    7746  * @return true on success
    7747  */
    7748 
    7749 bool p5RunDropTable(
     7744/** Deletes a diffRun table
     7745 *
     7746 * @return true on success
     7747 */
     7748
     7749bool diffRunDropTable(
    77507750    psDB            *dbh                ///< Database handle
    77517751);
     
    77587758 */
    77597759
    7760 bool p5RunInsert(
    7761     psDB            *dbh,               ///< Database handle
    7762     psS32           p5_id,
     7760bool diffRunInsert(
     7761    psDB            *dbh,               ///< Database handle
     7762    psS32           diff_id,
    77637763    const char      *state,
    77647764    const char      *workdir,
     
    77747774 */
    77757775
    7776 long long p5RunDelete(
     7776long long diffRunDelete(
    77777777    psDB            *dbh,               ///< Database handle
    77787778    const psMetadata *where,            ///< Row match criteria
     
    77807780);
    77817781
    7782 /** Insert a single p5RunRow object into a table
     7782/** Insert a single diffRunRow object into a table
    77837783 *
    77847784 * This function constructs and inserts a single row based on it's parameters.
     
    77877787 */
    77887788
    7789 bool p5RunInsertObject(
    7790     psDB            *dbh,               ///< Database handle
    7791     p5RunRow        *object             ///< p5RunRow object
    7792 );
    7793 
    7794 /** Insert an array of p5RunRow object into a table
     7789bool diffRunInsertObject(
     7790    psDB            *dbh,               ///< Database handle
     7791    diffRunRow      *object             ///< diffRunRow object
     7792);
     7793
     7794/** Insert an array of diffRunRow object into a table
    77957795 *
    77967796 * This function constructs and inserts multiple rows based on it's parameters.
     
    77997799 */
    78007800
    7801 bool p5RunInsertObjects(
    7802     psDB            *dbh,               ///< Database handle
    7803     psArray         *objects            ///< array of p5RunRow objects
    7804 );
    7805 
    7806 /** Insert data from a binary FITS table p5RunRow into the database
     7801bool diffRunInsertObjects(
     7802    psDB            *dbh,               ///< Database handle
     7803    psArray         *objects            ///< array of diffRunRow objects
     7804);
     7805
     7806/** Insert data from a binary FITS table diffRunRow into the database
    78077807 *
    78087808 * This function expects a psFits object with a FITS table as the first
     
    78147814 */
    78157815
    7816 bool p5RunInsertFits(
     7816bool diffRunInsertFits(
    78177817    psDB            *dbh,               ///< Database handle
    78187818    const psFits    *fits               ///< psFits object
     
    78297829 */
    78307830
    7831 bool p5RunSelectRowsFits(
     7831bool diffRunSelectRowsFits(
    78327832    psDB            *dbh,               ///< Database handle
    78337833    psFits          *fits,              ///< psFits object
     
    78367836);
    78377837
    7838 /** Convert a p5RunRow into an equivalent psMetadata
     7838/** Convert a diffRunRow into an equivalent psMetadata
    78397839 *
    78407840 * @return A psMetadata pointer or NULL on error
    78417841 */
    78427842
    7843 psMetadata *p5RunMetadataFromObject(
    7844     const p5RunRow *object             ///< fooRow to convert into a psMetadata
     7843psMetadata *diffRunMetadataFromObject(
     7844    const diffRunRow *object             ///< fooRow to convert into a psMetadata
    78457845);
    78467846
    78477847/** Convert a psMetadata into an equivalent fooRow
    78487848 *
    7849  * @return A p5RunRow pointer or NULL on error
    7850  */
    7851 
    7852 p5RunRow *p5RunObjectFromMetadata(
     7849 * @return A diffRunRow pointer or NULL on error
     7850 */
     7851
     7852diffRunRow *diffRunObjectFromMetadata(
    78537853    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    78547854);
    7855 /** Selects up to limit rows from the database and returns as p5RunRow objects in a psArray
     7855/** Selects up to limit rows from the database and returns as diffRunRow objects in a psArray
    78567856 *
    78577857 *  See psDBSelectRows() for documentation on the format of where.
     
    78607860 */
    78617861
    7862 psArray *p5RunSelectRowObjects(
     7862psArray *diffRunSelectRowObjects(
    78637863    psDB            *dbh,               ///< Database handle
    78647864    const psMetadata *where,            ///< Row match criteria
    78657865    unsigned long long limit            ///< Maximum number of elements to return
    78667866);
    7867 /** Deletes a row from the database coresponding to an p5Run
     7867/** Deletes a row from the database coresponding to an diffRun
    78687868 *
    78697869 *  Note that a 'where' search psMetadata is constructed from each object and
     
    78737873 */
    78747874
    7875 bool p5RunDeleteObject(
    7876     psDB            *dbh,               ///< Database handle
    7877     const p5RunRow *object    ///< Object to delete
     7875bool diffRunDeleteObject(
     7876    psDB            *dbh,               ///< Database handle
     7877    const diffRunRow *object    ///< Object to delete
    78787878);
    78797879/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    78857885 */
    78867886
    7887 long long p5RunDeleteRowObjects(
     7887long long diffRunDeleteRowObjects(
    78887888    psDB            *dbh,               ///< Database handle
    78897889    const psArray   *objects,           ///< Array of objects to delete
    78907890    unsigned long long limit            ///< Maximum number of elements to delete
    78917891);
    7892 /** Formats and prints an array of p5RunRow objects
     7892/** Formats and prints an array of diffRunRow objects
    78937893 *
    78947894 * When mdcf is set the formated output is in psMetadataConfig
     
    78987898 */
    78997899
    7900 bool p5RunPrintObjects(
     7900bool diffRunPrintObjects(
    79017901    FILE            *stream,            ///< a stream
    7902     psArray         *objects,           ///< An array of p5RunRow objects
     7902    psArray         *objects,           ///< An array of diffRunRow objects
    79037903    bool            mdcf                ///< format as mdconfig or simple
    79047904);
    7905 /** Formats and prints an p5RunRow object
     7905/** Formats and prints an diffRunRow object
    79067906 *
    79077907 * When mdcf is set the formated output is in psMetadataConfig
     
    79117911 */
    79127912
    7913 bool p5RunPrintObject(
     7913bool diffRunPrintObject(
    79147914    FILE            *stream,            ///< a stream
    7915     p5RunRow *object,    ///< an p5RunRow object
     7915    diffRunRow *object,    ///< an diffRunRow object
    79167916    bool            mdcf                ///< format as mdconfig or simple
    79177917);
    7918 /** p5InputSkyfileRow data structure
    7919  *
    7920  * Structure for representing a single row of p5InputSkyfile table data.
     7918/** diffInputSkyfileRow data structure
     7919 *
     7920 * Structure for representing a single row of diffInputSkyfile table data.
    79217921 */
    79227922
    79237923typedef struct {
    7924     psS32           p5_id;
    7925     psS32           p4_id;
     7924    psS32           diff_id;
     7925    psS32           warp_id;
    79267926    char            *skycell_id;
    79277927    char            *tess_id;
    79287928    char            *kind;
    79297929    bool            template;
    7930 } p5InputSkyfileRow;
    7931 
    7932 /** Creates a new p5InputSkyfileRow object
    7933  *
    7934  *  @return A new p5InputSkyfileRow object or NULL on failure.
    7935  */
    7936 
    7937 p5InputSkyfileRow *p5InputSkyfileRowAlloc(
    7938     psS32           p5_id,
    7939     psS32           p4_id,
     7930} diffInputSkyfileRow;
     7931
     7932/** Creates a new diffInputSkyfileRow object
     7933 *
     7934 *  @return A new diffInputSkyfileRow object or NULL on failure.
     7935 */
     7936
     7937diffInputSkyfileRow *diffInputSkyfileRowAlloc(
     7938    psS32           diff_id,
     7939    psS32           warp_id,
    79407940    const char      *skycell_id,
    79417941    const char      *tess_id,
     
    79447944);
    79457945
    7946 /** Creates a new p5InputSkyfile table
    7947  *
    7948  * @return true on success
    7949  */
    7950 
    7951 bool p5InputSkyfileCreateTable(
     7946/** Creates a new diffInputSkyfile table
     7947 *
     7948 * @return true on success
     7949 */
     7950
     7951bool diffInputSkyfileCreateTable(
    79527952    psDB            *dbh                ///< Database handle
    79537953);
    79547954
    7955 /** Deletes a p5InputSkyfile table
    7956  *
    7957  * @return true on success
    7958  */
    7959 
    7960 bool p5InputSkyfileDropTable(
     7955/** Deletes a diffInputSkyfile table
     7956 *
     7957 * @return true on success
     7958 */
     7959
     7960bool diffInputSkyfileDropTable(
    79617961    psDB            *dbh                ///< Database handle
    79627962);
     
    79697969 */
    79707970
    7971 bool p5InputSkyfileInsert(
    7972     psDB            *dbh,               ///< Database handle
    7973     psS32           p5_id,
    7974     psS32           p4_id,
     7971bool diffInputSkyfileInsert(
     7972    psDB            *dbh,               ///< Database handle
     7973    psS32           diff_id,
     7974    psS32           warp_id,
    79757975    const char      *skycell_id,
    79767976    const char      *tess_id,
     
    79847984 */
    79857985
    7986 long long p5InputSkyfileDelete(
     7986long long diffInputSkyfileDelete(
    79877987    psDB            *dbh,               ///< Database handle
    79887988    const psMetadata *where,            ///< Row match criteria
     
    79907990);
    79917991
    7992 /** Insert a single p5InputSkyfileRow object into a table
     7992/** Insert a single diffInputSkyfileRow object into a table
    79937993 *
    79947994 * This function constructs and inserts a single row based on it's parameters.
     
    79977997 */
    79987998
    7999 bool p5InputSkyfileInsertObject(
    8000     psDB            *dbh,               ///< Database handle
    8001     p5InputSkyfileRow *object             ///< p5InputSkyfileRow object
    8002 );
    8003 
    8004 /** Insert an array of p5InputSkyfileRow object into a table
     7999bool diffInputSkyfileInsertObject(
     8000    psDB            *dbh,               ///< Database handle
     8001    diffInputSkyfileRow *object             ///< diffInputSkyfileRow object
     8002);
     8003
     8004/** Insert an array of diffInputSkyfileRow object into a table
    80058005 *
    80068006 * This function constructs and inserts multiple rows based on it's parameters.
     
    80098009 */
    80108010
    8011 bool p5InputSkyfileInsertObjects(
    8012     psDB            *dbh,               ///< Database handle
    8013     psArray         *objects            ///< array of p5InputSkyfileRow objects
    8014 );
    8015 
    8016 /** Insert data from a binary FITS table p5InputSkyfileRow into the database
     8011bool diffInputSkyfileInsertObjects(
     8012    psDB            *dbh,               ///< Database handle
     8013    psArray         *objects            ///< array of diffInputSkyfileRow objects
     8014);
     8015
     8016/** Insert data from a binary FITS table diffInputSkyfileRow into the database
    80178017 *
    80188018 * This function expects a psFits object with a FITS table as the first
     
    80248024 */
    80258025
    8026 bool p5InputSkyfileInsertFits(
     8026bool diffInputSkyfileInsertFits(
    80278027    psDB            *dbh,               ///< Database handle
    80288028    const psFits    *fits               ///< psFits object
     
    80398039 */
    80408040
    8041 bool p5InputSkyfileSelectRowsFits(
     8041bool diffInputSkyfileSelectRowsFits(
    80428042    psDB            *dbh,               ///< Database handle
    80438043    psFits          *fits,              ///< psFits object
     
    80468046);
    80478047
    8048 /** Convert a p5InputSkyfileRow into an equivalent psMetadata
     8048/** Convert a diffInputSkyfileRow into an equivalent psMetadata
    80498049 *
    80508050 * @return A psMetadata pointer or NULL on error
    80518051 */
    80528052
    8053 psMetadata *p5InputSkyfileMetadataFromObject(
    8054     const p5InputSkyfileRow *object             ///< fooRow to convert into a psMetadata
     8053psMetadata *diffInputSkyfileMetadataFromObject(
     8054    const diffInputSkyfileRow *object             ///< fooRow to convert into a psMetadata
    80558055);
    80568056
    80578057/** Convert a psMetadata into an equivalent fooRow
    80588058 *
    8059  * @return A p5InputSkyfileRow pointer or NULL on error
    8060  */
    8061 
    8062 p5InputSkyfileRow *p5InputSkyfileObjectFromMetadata(
     8059 * @return A diffInputSkyfileRow pointer or NULL on error
     8060 */
     8061
     8062diffInputSkyfileRow *diffInputSkyfileObjectFromMetadata(
    80638063    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    80648064);
    8065 /** Selects up to limit rows from the database and returns as p5InputSkyfileRow objects in a psArray
     8065/** Selects up to limit rows from the database and returns as diffInputSkyfileRow objects in a psArray
    80668066 *
    80678067 *  See psDBSelectRows() for documentation on the format of where.
     
    80708070 */
    80718071
    8072 psArray *p5InputSkyfileSelectRowObjects(
     8072psArray *diffInputSkyfileSelectRowObjects(
    80738073    psDB            *dbh,               ///< Database handle
    80748074    const psMetadata *where,            ///< Row match criteria
    80758075    unsigned long long limit            ///< Maximum number of elements to return
    80768076);
    8077 /** Deletes a row from the database coresponding to an p5InputSkyfile
     8077/** Deletes a row from the database coresponding to an diffInputSkyfile
    80788078 *
    80798079 *  Note that a 'where' search psMetadata is constructed from each object and
     
    80838083 */
    80848084
    8085 bool p5InputSkyfileDeleteObject(
    8086     psDB            *dbh,               ///< Database handle
    8087     const p5InputSkyfileRow *object    ///< Object to delete
     8085bool diffInputSkyfileDeleteObject(
     8086    psDB            *dbh,               ///< Database handle
     8087    const diffInputSkyfileRow *object    ///< Object to delete
    80888088);
    80898089/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    80958095 */
    80968096
    8097 long long p5InputSkyfileDeleteRowObjects(
     8097long long diffInputSkyfileDeleteRowObjects(
    80988098    psDB            *dbh,               ///< Database handle
    80998099    const psArray   *objects,           ///< Array of objects to delete
    81008100    unsigned long long limit            ///< Maximum number of elements to delete
    81018101);
    8102 /** Formats and prints an array of p5InputSkyfileRow objects
     8102/** Formats and prints an array of diffInputSkyfileRow objects
    81038103 *
    81048104 * When mdcf is set the formated output is in psMetadataConfig
     
    81088108 */
    81098109
    8110 bool p5InputSkyfilePrintObjects(
     8110bool diffInputSkyfilePrintObjects(
    81118111    FILE            *stream,            ///< a stream
    8112     psArray         *objects,           ///< An array of p5InputSkyfileRow objects
     8112    psArray         *objects,           ///< An array of diffInputSkyfileRow objects
    81138113    bool            mdcf                ///< format as mdconfig or simple
    81148114);
    8115 /** Formats and prints an p5InputSkyfileRow object
     8115/** Formats and prints an diffInputSkyfileRow object
    81168116 *
    81178117 * When mdcf is set the formated output is in psMetadataConfig
     
    81218121 */
    81228122
    8123 bool p5InputSkyfilePrintObject(
     8123bool diffInputSkyfilePrintObject(
    81248124    FILE            *stream,            ///< a stream
    8125     p5InputSkyfileRow *object,    ///< an p5InputSkyfileRow object
     8125    diffInputSkyfileRow *object,    ///< an diffInputSkyfileRow object
    81268126    bool            mdcf                ///< format as mdconfig or simple
    81278127);
    8128 /** p5DiffSkyfileRow data structure
    8129  *
    8130  * Structure for representing a single row of p5DiffSkyfile table data.
     8128/** diffSkyfileRow data structure
     8129 *
     8130 * Structure for representing a single row of diffSkyfile table data.
    81318131 */
    81328132
    81338133typedef struct {
    8134     psS32           p5_id;
     8134    psS32           diff_id;
    81358135    char            *uri;
    81368136    psF64           bg;
    81378137    psF64           bg_mean_stdev;
    8138 } p5DiffSkyfileRow;
    8139 
    8140 /** Creates a new p5DiffSkyfileRow object
    8141  *
    8142  *  @return A new p5DiffSkyfileRow object or NULL on failure.
    8143  */
    8144 
    8145 p5DiffSkyfileRow *p5DiffSkyfileRowAlloc(
    8146     psS32           p5_id,
     8138} diffSkyfileRow;
     8139
     8140/** Creates a new diffSkyfileRow object
     8141 *
     8142 *  @return A new diffSkyfileRow object or NULL on failure.
     8143 */
     8144
     8145diffSkyfileRow *diffSkyfileRowAlloc(
     8146    psS32           diff_id,
    81478147    const char      *uri,
    81488148    psF64           bg,
     
    81508150);
    81518151
    8152 /** Creates a new p5DiffSkyfile table
    8153  *
    8154  * @return true on success
    8155  */
    8156 
    8157 bool p5DiffSkyfileCreateTable(
     8152/** Creates a new diffSkyfile table
     8153 *
     8154 * @return true on success
     8155 */
     8156
     8157bool diffSkyfileCreateTable(
    81588158    psDB            *dbh                ///< Database handle
    81598159);
    81608160
    8161 /** Deletes a p5DiffSkyfile table
    8162  *
    8163  * @return true on success
    8164  */
    8165 
    8166 bool p5DiffSkyfileDropTable(
     8161/** Deletes a diffSkyfile table
     8162 *
     8163 * @return true on success
     8164 */
     8165
     8166bool diffSkyfileDropTable(
    81678167    psDB            *dbh                ///< Database handle
    81688168);
     
    81758175 */
    81768176
    8177 bool p5DiffSkyfileInsert(
    8178     psDB            *dbh,               ///< Database handle
    8179     psS32           p5_id,
     8177bool diffSkyfileInsert(
     8178    psDB            *dbh,               ///< Database handle
     8179    psS32           diff_id,
    81808180    const char      *uri,
    81818181    psF64           bg,
     
    81888188 */
    81898189
    8190 long long p5DiffSkyfileDelete(
     8190long long diffSkyfileDelete(
    81918191    psDB            *dbh,               ///< Database handle
    81928192    const psMetadata *where,            ///< Row match criteria
     
    81948194);
    81958195
    8196 /** Insert a single p5DiffSkyfileRow object into a table
     8196/** Insert a single diffSkyfileRow object into a table
    81978197 *
    81988198 * This function constructs and inserts a single row based on it's parameters.
     
    82018201 */
    82028202
    8203 bool p5DiffSkyfileInsertObject(
    8204     psDB            *dbh,               ///< Database handle
    8205     p5DiffSkyfileRow *object             ///< p5DiffSkyfileRow object
    8206 );
    8207 
    8208 /** Insert an array of p5DiffSkyfileRow object into a table
     8203bool diffSkyfileInsertObject(
     8204    psDB            *dbh,               ///< Database handle
     8205    diffSkyfileRow  *object             ///< diffSkyfileRow object
     8206);
     8207
     8208/** Insert an array of diffSkyfileRow object into a table
    82098209 *
    82108210 * This function constructs and inserts multiple rows based on it's parameters.
     
    82138213 */
    82148214
    8215 bool p5DiffSkyfileInsertObjects(
    8216     psDB            *dbh,               ///< Database handle
    8217     psArray         *objects            ///< array of p5DiffSkyfileRow objects
    8218 );
    8219 
    8220 /** Insert data from a binary FITS table p5DiffSkyfileRow into the database
     8215bool diffSkyfileInsertObjects(
     8216    psDB            *dbh,               ///< Database handle
     8217    psArray         *objects            ///< array of diffSkyfileRow objects
     8218);
     8219
     8220/** Insert data from a binary FITS table diffSkyfileRow into the database
    82218221 *
    82228222 * This function expects a psFits object with a FITS table as the first
     
    82288228 */
    82298229
    8230 bool p5DiffSkyfileInsertFits(
     8230bool diffSkyfileInsertFits(
    82318231    psDB            *dbh,               ///< Database handle
    82328232    const psFits    *fits               ///< psFits object
     
    82438243 */
    82448244
    8245 bool p5DiffSkyfileSelectRowsFits(
     8245bool diffSkyfileSelectRowsFits(
    82468246    psDB            *dbh,               ///< Database handle
    82478247    psFits          *fits,              ///< psFits object
     
    82508250);
    82518251
    8252 /** Convert a p5DiffSkyfileRow into an equivalent psMetadata
     8252/** Convert a diffSkyfileRow into an equivalent psMetadata
    82538253 *
    82548254 * @return A psMetadata pointer or NULL on error
    82558255 */
    82568256
    8257 psMetadata *p5DiffSkyfileMetadataFromObject(
    8258     const p5DiffSkyfileRow *object             ///< fooRow to convert into a psMetadata
     8257psMetadata *diffSkyfileMetadataFromObject(
     8258    const diffSkyfileRow *object             ///< fooRow to convert into a psMetadata
    82598259);
    82608260
    82618261/** Convert a psMetadata into an equivalent fooRow
    82628262 *
    8263  * @return A p5DiffSkyfileRow pointer or NULL on error
    8264  */
    8265 
    8266 p5DiffSkyfileRow *p5DiffSkyfileObjectFromMetadata(
     8263 * @return A diffSkyfileRow pointer or NULL on error
     8264 */
     8265
     8266diffSkyfileRow *diffSkyfileObjectFromMetadata(
    82678267    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    82688268);
    8269 /** Selects up to limit rows from the database and returns as p5DiffSkyfileRow objects in a psArray
     8269/** Selects up to limit rows from the database and returns as diffSkyfileRow objects in a psArray
    82708270 *
    82718271 *  See psDBSelectRows() for documentation on the format of where.
     
    82748274 */
    82758275
    8276 psArray *p5DiffSkyfileSelectRowObjects(
     8276psArray *diffSkyfileSelectRowObjects(
    82778277    psDB            *dbh,               ///< Database handle
    82788278    const psMetadata *where,            ///< Row match criteria
    82798279    unsigned long long limit            ///< Maximum number of elements to return
    82808280);
    8281 /** Deletes a row from the database coresponding to an p5DiffSkyfile
     8281/** Deletes a row from the database coresponding to an diffSkyfile
    82828282 *
    82838283 *  Note that a 'where' search psMetadata is constructed from each object and
     
    82878287 */
    82888288
    8289 bool p5DiffSkyfileDeleteObject(
    8290     psDB            *dbh,               ///< Database handle
    8291     const p5DiffSkyfileRow *object    ///< Object to delete
     8289bool diffSkyfileDeleteObject(
     8290    psDB            *dbh,               ///< Database handle
     8291    const diffSkyfileRow *object    ///< Object to delete
    82928292);
    82938293/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    82998299 */
    83008300
    8301 long long p5DiffSkyfileDeleteRowObjects(
     8301long long diffSkyfileDeleteRowObjects(
    83028302    psDB            *dbh,               ///< Database handle
    83038303    const psArray   *objects,           ///< Array of objects to delete
    83048304    unsigned long long limit            ///< Maximum number of elements to delete
    83058305);
    8306 /** Formats and prints an array of p5DiffSkyfileRow objects
     8306/** Formats and prints an array of diffSkyfileRow objects
    83078307 *
    83088308 * When mdcf is set the formated output is in psMetadataConfig
     
    83128312 */
    83138313
    8314 bool p5DiffSkyfilePrintObjects(
     8314bool diffSkyfilePrintObjects(
    83158315    FILE            *stream,            ///< a stream
    8316     psArray         *objects,           ///< An array of p5DiffSkyfileRow objects
     8316    psArray         *objects,           ///< An array of diffSkyfileRow objects
    83178317    bool            mdcf                ///< format as mdconfig or simple
    83188318);
    8319 /** Formats and prints an p5DiffSkyfileRow object
     8319/** Formats and prints an diffSkyfileRow object
    83208320 *
    83218321 * When mdcf is set the formated output is in psMetadataConfig
     
    83258325 */
    83268326
    8327 bool p5DiffSkyfilePrintObject(
     8327bool diffSkyfilePrintObject(
    83288328    FILE            *stream,            ///< a stream
    8329     p5DiffSkyfileRow *object,    ///< an p5DiffSkyfileRow object
     8329    diffSkyfileRow *object,    ///< an diffSkyfileRow object
    83308330    bool            mdcf                ///< format as mdconfig or simple
    83318331);
    8332 /** p6RunRow data structure
    8333  *
    8334  * Structure for representing a single row of p6Run table data.
     8332/** stackRunRow data structure
     8333 *
     8334 * Structure for representing a single row of stackRun table data.
    83358335 */
    83368336
    83378337typedef struct {
    8338     psS32           p6_id;
     8338    psS32           stack_id;
    83398339    char            *state;
    83408340    char            *workdir;
     
    83438343    char            *skycell_id;
    83448344    char            *tess_id;
    8345 } p6RunRow;
    8346 
    8347 /** Creates a new p6RunRow object
    8348  *
    8349  *  @return A new p6RunRow object or NULL on failure.
    8350  */
    8351 
    8352 p6RunRow *p6RunRowAlloc(
    8353     psS32           p6_id,
     8345} stackRunRow;
     8346
     8347/** Creates a new stackRunRow object
     8348 *
     8349 *  @return A new stackRunRow object or NULL on failure.
     8350 */
     8351
     8352stackRunRow *stackRunRowAlloc(
     8353    psS32           stack_id,
    83548354    const char      *state,
    83558355    const char      *workdir,
     
    83608360);
    83618361
    8362 /** Creates a new p6Run table
    8363  *
    8364  * @return true on success
    8365  */
    8366 
    8367 bool p6RunCreateTable(
     8362/** Creates a new stackRun table
     8363 *
     8364 * @return true on success
     8365 */
     8366
     8367bool stackRunCreateTable(
    83688368    psDB            *dbh                ///< Database handle
    83698369);
    83708370
    8371 /** Deletes a p6Run table
    8372  *
    8373  * @return true on success
    8374  */
    8375 
    8376 bool p6RunDropTable(
     8371/** Deletes a stackRun table
     8372 *
     8373 * @return true on success
     8374 */
     8375
     8376bool stackRunDropTable(
    83778377    psDB            *dbh                ///< Database handle
    83788378);
     
    83858385 */
    83868386
    8387 bool p6RunInsert(
    8388     psDB            *dbh,               ///< Database handle
    8389     psS32           p6_id,
     8387bool stackRunInsert(
     8388    psDB            *dbh,               ///< Database handle
     8389    psS32           stack_id,
    83908390    const char      *state,
    83918391    const char      *workdir,
     
    84018401 */
    84028402
    8403 long long p6RunDelete(
     8403long long stackRunDelete(
    84048404    psDB            *dbh,               ///< Database handle
    84058405    const psMetadata *where,            ///< Row match criteria
     
    84078407);
    84088408
    8409 /** Insert a single p6RunRow object into a table
     8409/** Insert a single stackRunRow object into a table
    84108410 *
    84118411 * This function constructs and inserts a single row based on it's parameters.
     
    84148414 */
    84158415
    8416 bool p6RunInsertObject(
    8417     psDB            *dbh,               ///< Database handle
    8418     p6RunRow        *object             ///< p6RunRow object
    8419 );
    8420 
    8421 /** Insert an array of p6RunRow object into a table
     8416bool stackRunInsertObject(
     8417    psDB            *dbh,               ///< Database handle
     8418    stackRunRow     *object             ///< stackRunRow object
     8419);
     8420
     8421/** Insert an array of stackRunRow object into a table
    84228422 *
    84238423 * This function constructs and inserts multiple rows based on it's parameters.
     
    84268426 */
    84278427
    8428 bool p6RunInsertObjects(
    8429     psDB            *dbh,               ///< Database handle
    8430     psArray         *objects            ///< array of p6RunRow objects
    8431 );
    8432 
    8433 /** Insert data from a binary FITS table p6RunRow into the database
     8428bool stackRunInsertObjects(
     8429    psDB            *dbh,               ///< Database handle
     8430    psArray         *objects            ///< array of stackRunRow objects
     8431);
     8432
     8433/** Insert data from a binary FITS table stackRunRow into the database
    84348434 *
    84358435 * This function expects a psFits object with a FITS table as the first
     
    84418441 */
    84428442
    8443 bool p6RunInsertFits(
     8443bool stackRunInsertFits(
    84448444    psDB            *dbh,               ///< Database handle
    84458445    const psFits    *fits               ///< psFits object
     
    84568456 */
    84578457
    8458 bool p6RunSelectRowsFits(
     8458bool stackRunSelectRowsFits(
    84598459    psDB            *dbh,               ///< Database handle
    84608460    psFits          *fits,              ///< psFits object
     
    84638463);
    84648464
    8465 /** Convert a p6RunRow into an equivalent psMetadata
     8465/** Convert a stackRunRow into an equivalent psMetadata
    84668466 *
    84678467 * @return A psMetadata pointer or NULL on error
    84688468 */
    84698469
    8470 psMetadata *p6RunMetadataFromObject(
    8471     const p6RunRow *object             ///< fooRow to convert into a psMetadata
     8470psMetadata *stackRunMetadataFromObject(
     8471    const stackRunRow *object             ///< fooRow to convert into a psMetadata
    84728472);
    84738473
    84748474/** Convert a psMetadata into an equivalent fooRow
    84758475 *
    8476  * @return A p6RunRow pointer or NULL on error
    8477  */
    8478 
    8479 p6RunRow *p6RunObjectFromMetadata(
     8476 * @return A stackRunRow pointer or NULL on error
     8477 */
     8478
     8479stackRunRow *stackRunObjectFromMetadata(
    84808480    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    84818481);
    8482 /** Selects up to limit rows from the database and returns as p6RunRow objects in a psArray
     8482/** Selects up to limit rows from the database and returns as stackRunRow objects in a psArray
    84838483 *
    84848484 *  See psDBSelectRows() for documentation on the format of where.
     
    84878487 */
    84888488
    8489 psArray *p6RunSelectRowObjects(
     8489psArray *stackRunSelectRowObjects(
    84908490    psDB            *dbh,               ///< Database handle
    84918491    const psMetadata *where,            ///< Row match criteria
    84928492    unsigned long long limit            ///< Maximum number of elements to return
    84938493);
    8494 /** Deletes a row from the database coresponding to an p6Run
     8494/** Deletes a row from the database coresponding to an stackRun
    84958495 *
    84968496 *  Note that a 'where' search psMetadata is constructed from each object and
     
    85008500 */
    85018501
    8502 bool p6RunDeleteObject(
    8503     psDB            *dbh,               ///< Database handle
    8504     const p6RunRow *object    ///< Object to delete
     8502bool stackRunDeleteObject(
     8503    psDB            *dbh,               ///< Database handle
     8504    const stackRunRow *object    ///< Object to delete
    85058505);
    85068506/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    85128512 */
    85138513
    8514 long long p6RunDeleteRowObjects(
     8514long long stackRunDeleteRowObjects(
    85158515    psDB            *dbh,               ///< Database handle
    85168516    const psArray   *objects,           ///< Array of objects to delete
    85178517    unsigned long long limit            ///< Maximum number of elements to delete
    85188518);
    8519 /** Formats and prints an array of p6RunRow objects
     8519/** Formats and prints an array of stackRunRow objects
    85208520 *
    85218521 * When mdcf is set the formated output is in psMetadataConfig
     
    85258525 */
    85268526
    8527 bool p6RunPrintObjects(
     8527bool stackRunPrintObjects(
    85288528    FILE            *stream,            ///< a stream
    8529     psArray         *objects,           ///< An array of p6RunRow objects
     8529    psArray         *objects,           ///< An array of stackRunRow objects
    85308530    bool            mdcf                ///< format as mdconfig or simple
    85318531);
    8532 /** Formats and prints an p6RunRow object
     8532/** Formats and prints an stackRunRow object
    85338533 *
    85348534 * When mdcf is set the formated output is in psMetadataConfig
     
    85388538 */
    85398539
    8540 bool p6RunPrintObject(
     8540bool stackRunPrintObject(
    85418541    FILE            *stream,            ///< a stream
    8542     p6RunRow *object,    ///< an p6RunRow object
     8542    stackRunRow *object,    ///< an stackRunRow object
    85438543    bool            mdcf                ///< format as mdconfig or simple
    85448544);
    8545 /** p6InputSkyfileRow data structure
    8546  *
    8547  * Structure for representing a single row of p6InputSkyfile table data.
     8545/** stackInputSkyfileRow data structure
     8546 *
     8547 * Structure for representing a single row of stackInputSkyfile table data.
    85488548 */
    85498549
    85508550typedef struct {
    8551     psS32           p6_id;
    8552     psS32           p4_id;
    8553 } p6InputSkyfileRow;
    8554 
    8555 /** Creates a new p6InputSkyfileRow object
    8556  *
    8557  *  @return A new p6InputSkyfileRow object or NULL on failure.
    8558  */
    8559 
    8560 p6InputSkyfileRow *p6InputSkyfileRowAlloc(
    8561     psS32           p6_id,
    8562     psS32           p4_id
    8563 );
    8564 
    8565 /** Creates a new p6InputSkyfile table
    8566  *
    8567  * @return true on success
    8568  */
    8569 
    8570 bool p6InputSkyfileCreateTable(
     8551    psS32           stack_id;
     8552    psS32           warp_id;
     8553} stackInputSkyfileRow;
     8554
     8555/** Creates a new stackInputSkyfileRow object
     8556 *
     8557 *  @return A new stackInputSkyfileRow object or NULL on failure.
     8558 */
     8559
     8560stackInputSkyfileRow *stackInputSkyfileRowAlloc(
     8561    psS32           stack_id,
     8562    psS32           warp_id
     8563);
     8564
     8565/** Creates a new stackInputSkyfile table
     8566 *
     8567 * @return true on success
     8568 */
     8569
     8570bool stackInputSkyfileCreateTable(
    85718571    psDB            *dbh                ///< Database handle
    85728572);
    85738573
    8574 /** Deletes a p6InputSkyfile table
    8575  *
    8576  * @return true on success
    8577  */
    8578 
    8579 bool p6InputSkyfileDropTable(
     8574/** Deletes a stackInputSkyfile table
     8575 *
     8576 * @return true on success
     8577 */
     8578
     8579bool stackInputSkyfileDropTable(
    85808580    psDB            *dbh                ///< Database handle
    85818581);
     
    85888588 */
    85898589
    8590 bool p6InputSkyfileInsert(
    8591     psDB            *dbh,               ///< Database handle
    8592     psS32           p6_id,
    8593     psS32           p4_id
     8590bool stackInputSkyfileInsert(
     8591    psDB            *dbh,               ///< Database handle
     8592    psS32           stack_id,
     8593    psS32           warp_id
    85948594);
    85958595
     
    85998599 */
    86008600
    8601 long long p6InputSkyfileDelete(
     8601long long stackInputSkyfileDelete(
    86028602    psDB            *dbh,               ///< Database handle
    86038603    const psMetadata *where,            ///< Row match criteria
     
    86058605);
    86068606
    8607 /** Insert a single p6InputSkyfileRow object into a table
     8607/** Insert a single stackInputSkyfileRow object into a table
    86088608 *
    86098609 * This function constructs and inserts a single row based on it's parameters.
     
    86128612 */
    86138613
    8614 bool p6InputSkyfileInsertObject(
    8615     psDB            *dbh,               ///< Database handle
    8616     p6InputSkyfileRow *object             ///< p6InputSkyfileRow object
    8617 );
    8618 
    8619 /** Insert an array of p6InputSkyfileRow object into a table
     8614bool stackInputSkyfileInsertObject(
     8615    psDB            *dbh,               ///< Database handle
     8616    stackInputSkyfileRow *object             ///< stackInputSkyfileRow object
     8617);
     8618
     8619/** Insert an array of stackInputSkyfileRow object into a table
    86208620 *
    86218621 * This function constructs and inserts multiple rows based on it's parameters.
     
    86248624 */
    86258625
    8626 bool p6InputSkyfileInsertObjects(
    8627     psDB            *dbh,               ///< Database handle
    8628     psArray         *objects            ///< array of p6InputSkyfileRow objects
    8629 );
    8630 
    8631 /** Insert data from a binary FITS table p6InputSkyfileRow into the database
     8626bool stackInputSkyfileInsertObjects(
     8627    psDB            *dbh,               ///< Database handle
     8628    psArray         *objects            ///< array of stackInputSkyfileRow objects
     8629);
     8630
     8631/** Insert data from a binary FITS table stackInputSkyfileRow into the database
    86328632 *
    86338633 * This function expects a psFits object with a FITS table as the first
     
    86398639 */
    86408640
    8641 bool p6InputSkyfileInsertFits(
     8641bool stackInputSkyfileInsertFits(
    86428642    psDB            *dbh,               ///< Database handle
    86438643    const psFits    *fits               ///< psFits object
     
    86548654 */
    86558655
    8656 bool p6InputSkyfileSelectRowsFits(
     8656bool stackInputSkyfileSelectRowsFits(
    86578657    psDB            *dbh,               ///< Database handle
    86588658    psFits          *fits,              ///< psFits object
     
    86618661);
    86628662
    8663 /** Convert a p6InputSkyfileRow into an equivalent psMetadata
     8663/** Convert a stackInputSkyfileRow into an equivalent psMetadata
    86648664 *
    86658665 * @return A psMetadata pointer or NULL on error
    86668666 */
    86678667
    8668 psMetadata *p6InputSkyfileMetadataFromObject(
    8669     const p6InputSkyfileRow *object             ///< fooRow to convert into a psMetadata
     8668psMetadata *stackInputSkyfileMetadataFromObject(
     8669    const stackInputSkyfileRow *object             ///< fooRow to convert into a psMetadata
    86708670);
    86718671
    86728672/** Convert a psMetadata into an equivalent fooRow
    86738673 *
    8674  * @return A p6InputSkyfileRow pointer or NULL on error
    8675  */
    8676 
    8677 p6InputSkyfileRow *p6InputSkyfileObjectFromMetadata(
     8674 * @return A stackInputSkyfileRow pointer or NULL on error
     8675 */
     8676
     8677stackInputSkyfileRow *stackInputSkyfileObjectFromMetadata(
    86788678    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    86798679);
    8680 /** Selects up to limit rows from the database and returns as p6InputSkyfileRow objects in a psArray
     8680/** Selects up to limit rows from the database and returns as stackInputSkyfileRow objects in a psArray
    86818681 *
    86828682 *  See psDBSelectRows() for documentation on the format of where.
     
    86858685 */
    86868686
    8687 psArray *p6InputSkyfileSelectRowObjects(
     8687psArray *stackInputSkyfileSelectRowObjects(
    86888688    psDB            *dbh,               ///< Database handle
    86898689    const psMetadata *where,            ///< Row match criteria
    86908690    unsigned long long limit            ///< Maximum number of elements to return
    86918691);
    8692 /** Deletes a row from the database coresponding to an p6InputSkyfile
     8692/** Deletes a row from the database coresponding to an stackInputSkyfile
    86938693 *
    86948694 *  Note that a 'where' search psMetadata is constructed from each object and
     
    86988698 */
    86998699
    8700 bool p6InputSkyfileDeleteObject(
    8701     psDB            *dbh,               ///< Database handle
    8702     const p6InputSkyfileRow *object    ///< Object to delete
     8700bool stackInputSkyfileDeleteObject(
     8701    psDB            *dbh,               ///< Database handle
     8702    const stackInputSkyfileRow *object    ///< Object to delete
    87038703);
    87048704/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    87108710 */
    87118711
    8712 long long p6InputSkyfileDeleteRowObjects(
     8712long long stackInputSkyfileDeleteRowObjects(
    87138713    psDB            *dbh,               ///< Database handle
    87148714    const psArray   *objects,           ///< Array of objects to delete
    87158715    unsigned long long limit            ///< Maximum number of elements to delete
    87168716);
    8717 /** Formats and prints an array of p6InputSkyfileRow objects
     8717/** Formats and prints an array of stackInputSkyfileRow objects
    87188718 *
    87198719 * When mdcf is set the formated output is in psMetadataConfig
     
    87238723 */
    87248724
    8725 bool p6InputSkyfilePrintObjects(
     8725bool stackInputSkyfilePrintObjects(
    87268726    FILE            *stream,            ///< a stream
    8727     psArray         *objects,           ///< An array of p6InputSkyfileRow objects
     8727    psArray         *objects,           ///< An array of stackInputSkyfileRow objects
    87288728    bool            mdcf                ///< format as mdconfig or simple
    87298729);
    8730 /** Formats and prints an p6InputSkyfileRow object
     8730/** Formats and prints an stackInputSkyfileRow object
    87318731 *
    87328732 * When mdcf is set the formated output is in psMetadataConfig
     
    87368736 */
    87378737
    8738 bool p6InputSkyfilePrintObject(
     8738bool stackInputSkyfilePrintObject(
    87398739    FILE            *stream,            ///< a stream
    8740     p6InputSkyfileRow *object,    ///< an p6InputSkyfileRow object
     8740    stackInputSkyfileRow *object,    ///< an stackInputSkyfileRow object
    87418741    bool            mdcf                ///< format as mdconfig or simple
    87428742);
    8743 /** p6SumSkyfileRow data structure
    8744  *
    8745  * Structure for representing a single row of p6SumSkyfile table data.
     8743/** stackSumSkyfileRow data structure
     8744 *
     8745 * Structure for representing a single row of stackSumSkyfile table data.
    87468746 */
    87478747
    87488748typedef struct {
    8749     psS32           p6_id;
     8749    psS32           stack_id;
    87508750    char            *uri;
    87518751    psF64           bg;
    87528752    psF64           bg_mean_stdev;
    8753 } p6SumSkyfileRow;
    8754 
    8755 /** Creates a new p6SumSkyfileRow object
    8756  *
    8757  *  @return A new p6SumSkyfileRow object or NULL on failure.
    8758  */
    8759 
    8760 p6SumSkyfileRow *p6SumSkyfileRowAlloc(
    8761     psS32           p6_id,
     8753} stackSumSkyfileRow;
     8754
     8755/** Creates a new stackSumSkyfileRow object
     8756 *
     8757 *  @return A new stackSumSkyfileRow object or NULL on failure.
     8758 */
     8759
     8760stackSumSkyfileRow *stackSumSkyfileRowAlloc(
     8761    psS32           stack_id,
    87628762    const char      *uri,
    87638763    psF64           bg,
     
    87658765);
    87668766
    8767 /** Creates a new p6SumSkyfile table
    8768  *
    8769  * @return true on success
    8770  */
    8771 
    8772 bool p6SumSkyfileCreateTable(
     8767/** Creates a new stackSumSkyfile table
     8768 *
     8769 * @return true on success
     8770 */
     8771
     8772bool stackSumSkyfileCreateTable(
    87738773    psDB            *dbh                ///< Database handle
    87748774);
    87758775
    8776 /** Deletes a p6SumSkyfile table
    8777  *
    8778  * @return true on success
    8779  */
    8780 
    8781 bool p6SumSkyfileDropTable(
     8776/** Deletes a stackSumSkyfile table
     8777 *
     8778 * @return true on success
     8779 */
     8780
     8781bool stackSumSkyfileDropTable(
    87828782    psDB            *dbh                ///< Database handle
    87838783);
     
    87908790 */
    87918791
    8792 bool p6SumSkyfileInsert(
    8793     psDB            *dbh,               ///< Database handle
    8794     psS32           p6_id,
     8792bool stackSumSkyfileInsert(
     8793    psDB            *dbh,               ///< Database handle
     8794    psS32           stack_id,
    87958795    const char      *uri,
    87968796    psF64           bg,
     
    88038803 */
    88048804
    8805 long long p6SumSkyfileDelete(
     8805long long stackSumSkyfileDelete(
    88068806    psDB            *dbh,               ///< Database handle
    88078807    const psMetadata *where,            ///< Row match criteria
     
    88098809);
    88108810
    8811 /** Insert a single p6SumSkyfileRow object into a table
     8811/** Insert a single stackSumSkyfileRow object into a table
    88128812 *
    88138813 * This function constructs and inserts a single row based on it's parameters.
     
    88168816 */
    88178817
    8818 bool p6SumSkyfileInsertObject(
    8819     psDB            *dbh,               ///< Database handle
    8820     p6SumSkyfileRow *object             ///< p6SumSkyfileRow object
    8821 );
    8822 
    8823 /** Insert an array of p6SumSkyfileRow object into a table
     8818bool stackSumSkyfileInsertObject(
     8819    psDB            *dbh,               ///< Database handle
     8820    stackSumSkyfileRow *object             ///< stackSumSkyfileRow object
     8821);
     8822
     8823/** Insert an array of stackSumSkyfileRow object into a table
    88248824 *
    88258825 * This function constructs and inserts multiple rows based on it's parameters.
     
    88288828 */
    88298829
    8830 bool p6SumSkyfileInsertObjects(
    8831     psDB            *dbh,               ///< Database handle
    8832     psArray         *objects            ///< array of p6SumSkyfileRow objects
    8833 );
    8834 
    8835 /** Insert data from a binary FITS table p6SumSkyfileRow into the database
     8830bool stackSumSkyfileInsertObjects(
     8831    psDB            *dbh,               ///< Database handle
     8832    psArray         *objects            ///< array of stackSumSkyfileRow objects
     8833);
     8834
     8835/** Insert data from a binary FITS table stackSumSkyfileRow into the database
    88368836 *
    88378837 * This function expects a psFits object with a FITS table as the first
     
    88438843 */
    88448844
    8845 bool p6SumSkyfileInsertFits(
     8845bool stackSumSkyfileInsertFits(
    88468846    psDB            *dbh,               ///< Database handle
    88478847    const psFits    *fits               ///< psFits object
     
    88588858 */
    88598859
    8860 bool p6SumSkyfileSelectRowsFits(
     8860bool stackSumSkyfileSelectRowsFits(
    88618861    psDB            *dbh,               ///< Database handle
    88628862    psFits          *fits,              ///< psFits object
     
    88658865);
    88668866
    8867 /** Convert a p6SumSkyfileRow into an equivalent psMetadata
     8867/** Convert a stackSumSkyfileRow into an equivalent psMetadata
    88688868 *
    88698869 * @return A psMetadata pointer or NULL on error
    88708870 */
    88718871
    8872 psMetadata *p6SumSkyfileMetadataFromObject(
    8873     const p6SumSkyfileRow *object             ///< fooRow to convert into a psMetadata
     8872psMetadata *stackSumSkyfileMetadataFromObject(
     8873    const stackSumSkyfileRow *object             ///< fooRow to convert into a psMetadata
    88748874);
    88758875
    88768876/** Convert a psMetadata into an equivalent fooRow
    88778877 *
    8878  * @return A p6SumSkyfileRow pointer or NULL on error
    8879  */
    8880 
    8881 p6SumSkyfileRow *p6SumSkyfileObjectFromMetadata(
     8878 * @return A stackSumSkyfileRow pointer or NULL on error
     8879 */
     8880
     8881stackSumSkyfileRow *stackSumSkyfileObjectFromMetadata(
    88828882    psMetadata      *md                 ///< psMetadata to convert into a fooRow
    88838883);
    8884 /** Selects up to limit rows from the database and returns as p6SumSkyfileRow objects in a psArray
     8884/** Selects up to limit rows from the database and returns as stackSumSkyfileRow objects in a psArray
    88858885 *
    88868886 *  See psDBSelectRows() for documentation on the format of where.
     
    88898889 */
    88908890
    8891 psArray *p6SumSkyfileSelectRowObjects(
     8891psArray *stackSumSkyfileSelectRowObjects(
    88928892    psDB            *dbh,               ///< Database handle
    88938893    const psMetadata *where,            ///< Row match criteria
    88948894    unsigned long long limit            ///< Maximum number of elements to return
    88958895);
    8896 /** Deletes a row from the database coresponding to an p6SumSkyfile
     8896/** Deletes a row from the database coresponding to an stackSumSkyfile
    88978897 *
    88988898 *  Note that a 'where' search psMetadata is constructed from each object and
     
    89028902 */
    89038903
    8904 bool p6SumSkyfileDeleteObject(
    8905     psDB            *dbh,               ///< Database handle
    8906     const p6SumSkyfileRow *object    ///< Object to delete
     8904bool stackSumSkyfileDeleteObject(
     8905    psDB            *dbh,               ///< Database handle
     8906    const stackSumSkyfileRow *object    ///< Object to delete
    89078907);
    89088908/** Deletes up to limit rows from the database and returns the number of rows actually deleted.
     
    89148914 */
    89158915
    8916 long long p6SumSkyfileDeleteRowObjects(
     8916long long stackSumSkyfileDeleteRowObjects(
    89178917    psDB            *dbh,               ///< Database handle
    89188918    const psArray   *objects,           ///< Array of objects to delete
    89198919    unsigned long long limit            ///< Maximum number of elements to delete
    89208920);
    8921 /** Formats and prints an array of p6SumSkyfileRow objects
     8921/** Formats and prints an array of stackSumSkyfileRow objects
    89228922 *
    89238923 * When mdcf is set the formated output is in psMetadataConfig
     
    89278927 */
    89288928
    8929 bool p6SumSkyfilePrintObjects(
     8929bool stackSumSkyfilePrintObjects(
    89308930    FILE            *stream,            ///< a stream
    8931     psArray         *objects,           ///< An array of p6SumSkyfileRow objects
     8931    psArray         *objects,           ///< An array of stackSumSkyfileRow objects
    89328932    bool            mdcf                ///< format as mdconfig or simple
    89338933);
    8934 /** Formats and prints an p6SumSkyfileRow object
     8934/** Formats and prints an stackSumSkyfileRow object
    89358935 *
    89368936 * When mdcf is set the formated output is in psMetadataConfig
     
    89408940 */
    89418941
    8942 bool p6SumSkyfilePrintObject(
     8942bool stackSumSkyfilePrintObject(
    89438943    FILE            *stream,            ///< a stream
    8944     p6SumSkyfileRow *object,    ///< an p6SumSkyfileRow object
     8944    stackSumSkyfileRow *object,    ///< an stackSumSkyfileRow object
    89458945    bool            mdcf                ///< format as mdconfig or simple
    89468946);
     
    89528952#endif
    89538953
    8954 #endif // P6SUMSKYFILE_DB_H
     8954#endif // STACKSUMSKYFILE_DB_H
Note: See TracChangeset for help on using the changeset viewer.