#include <string.h>
#include <assert.h>
#include <math.h>
#include "oimerge.h"
Defines | |
#define | MAX_TARGET 100 |
#define | UNSET_ARRNAME(pTab) { pTab->arrname[0] = '\0'; } |
Replace ARRNAME with empty string. | |
#define | REPLACE_INSNAME(pTab, oldInsname, insnameHash) |
Replace INSNAME with string from hash table. | |
#define | REPLACE_TARGET_ID(pTab, pInOi, targetIdHash) |
Replace TARGET_IDs with values from hash table. | |
Functions | |
oi_wavelength * | match_oi_wavelength (const oi_wavelength *pWave, const GList *list) |
Return pointer to first oi_wavelength in list that contains identical wavebands (in same order) to pWave. | |
GHashTable * | merge_oi_target (const GList *inList, oi_fits *pOutput) |
Copy records for uniquely-named targets into output target table. | |
GList * | merge_all_oi_wavelength (const GList *inList, oi_fits *pOutput) |
Copy unique wavelength tables into output dataset. | |
void | merge_all_oi_vis (const GList *inList, GHashTable *targetIdHash, const GList *insnameHashList, oi_fits *pOutput) |
Copy all input OI_VIS tables into output dataset. | |
void | merge_all_oi_vis2 (const GList *inList, GHashTable *targetIdHash, const GList *insnameHashList, oi_fits *pOutput) |
Copy all input OI_VIS2 tables into output dataset. | |
void | merge_all_oi_t3 (const GList *inList, GHashTable *targetIdHash, const GList *insnameHashList, oi_fits *pOutput) |
Copy all input OI_T3 tables into output dataset. | |
void | merge_oi_fits_list (const GList *inList, oi_fits *pOutput) |
Merge list of oi_fits structs into single dataset. | |
void | merge_oi_fits (oi_fits *pOutput, oi_fits *pInput1, oi_fits *pInput2,...) |
Merge supplied oi_fits structs into single dataset. |
Copyright (C) 2007 John Young
This file is part of OIFITSlib.
OIFITSlib is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
OIFITSlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with OIFITSlib. If not, see http://www.gnu.org/licenses/
#define MAX_TARGET 100 |
Referenced by merge_oi_target().
#define UNSET_ARRNAME | ( | pTab | ) | { pTab->arrname[0] = '\0'; } |
Replace ARRNAME with empty string.
Referenced by merge_all_oi_t3(), merge_all_oi_vis(), and merge_all_oi_vis2().
#define REPLACE_INSNAME | ( | pTab, | |||
oldInsname, | |||||
insnameHash | ) |
Value:
{ \ (void) g_strlcpy(pTab->insname, \ g_hash_table_lookup(insnameHash, oldInsname), \ FLEN_VALUE); \ }
Referenced by merge_all_oi_t3(), merge_all_oi_vis(), and merge_all_oi_vis2().
#define REPLACE_TARGET_ID | ( | pTab, | |||
pInOi, | |||||
targetIdHash | ) |
Value:
{ \ int ii; \ for(ii=0; ii<pTab->numrec; ii++) { \ /* hash table is indexed by target name */ \ pTab->record[ii].target_id = \ *((int *) g_hash_table_lookup( \ targetIdHash, \ oi_fits_lookup_target(pInOi, \ pTab->record[ii].target_id)->target)); \ } \ }
Referenced by merge_all_oi_t3(), merge_all_oi_vis(), and merge_all_oi_vis2().
oi_wavelength* match_oi_wavelength | ( | const oi_wavelength * | pWave, | |
const GList * | list | |||
) |
Return pointer to first oi_wavelength in list that contains identical wavebands (in same order) to pWave.
References oi_wavelength::eff_band, oi_wavelength::eff_wave, and oi_wavelength::nwave.
Referenced by merge_all_oi_wavelength().