<commit_before>#include "c_iraf.h"
#include "imphttab.h"


/* Function to implement a self-test of this library */
int main(int argc, char **argv){
    int status;


    PhotPar obs;
    char photmode[SZ_LINE];
    char refname[SZ_LINE], refpedigree[SZ_FITS_REC];

	void c_irafinit (int, char **);
    
    printf("==== Starting self-test for getphttab.c ====\n");

    status = 0;
	/* Initialize IRAF environment */
    c_irafinit(argc,argv);
    printf("==> Initialized IRAF environment for getphttab.\n");

    strcpy(photmode,"acs,wfc1,f814w,mjd#55021.0122");
    strcpy(refname,"acstest_v2_imp.fits");
    strcpy(refpedigree,"Inflight calibrations");
    
    printf("==> photmode: %s\n",&photmode);
    
    InitPhotPar(&obs, refname, refpedigree);
    printf("==> Finished InitPhotPar()\n");
    status = GetPhotTab(&obs, photmode);
    printf("==> Finished computing photometry keyword values.\n");
    FreePhotPar(&obs);
    printf("==> Cleaned up memory with FreePhotPar()\n");

    if (status == 0){
        printf("Test Results:\n");
        printf("  PHOTFLAM: %g\n  PHOTPLAM: %g\n  PHOTBW: %g\n", obs.photflam, obs.photplam, obs.photbw);
    } else {
        printf("Did not successfully determine PHOT values.\n");
    }
}<commit_msg>Update the testing code to read in a var-length array table. WJH<commit_after>#include "c_iraf.h"
#include "imphttab.h"


/* Function to implement a self-test of this library */
int main(int argc, char **argv){
    int status;


    PhotPar obs;
    char photmode[SZ_LINE];
    char refname[SZ_LINE], refpedigree[SZ_FITS_REC];

	void c_irafinit (int, char **);
    
    printf("==== Starting self-test for getphttab.c ====\n");

    status = 0;
	/* Initialize IRAF environment */
    c_irafinit(argc,argv);
    printf("==> Initialized IRAF environment for getphttab.\n");

    strcpy(photmode,"acs,wfc1,f814w,mjd#55021.0122");
    /*strcpy(refname,"acstest_v2_imp.fits"); */
    strcpy(refname,"acs_2dv1_imp.fits");
    strcpy(refpedigree,"Inflight calibrations");
    
    printf("==> photmode: %s\n",&photmode);
    
    InitPhotPar(&obs, refname, refpedigree);
    printf("==> Finished InitPhotPar()\n");
    status = GetPhotTab(&obs, photmode);
    printf("==> Finished computing photometry keyword values.\n");
    FreePhotPar(&obs);
    printf("==> Cleaned up memory with FreePhotPar()\n");

    if (status == 0){
        printf("Test Results:\n");
        printf("  PHOTFLAM: %g\n  PHOTPLAM: %g\n  PHOTBW: %g\n", obs.photflam, obs.photplam, obs.photbw);
    } else {
        printf("Did not successfully determine PHOT values.\n");
    }
}
{'fraction_non_alphanumeric': 0.16146435452793834, 'fraction_numerical': 0.013102119460500963, 'mean_word_length': 3.546409807355517, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '97881', 'n_tokens_mistral': 982, 'n_tokens_neox': 913, 'n_words': 210}