IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 24, 2013, 4:56:48 PM (13 years ago)
Author:
watersc1
Message:

Addition of WCS-reference option to fix the cases where the WCS is missing. Fix bug in WCS calculation/propagation that shows up when corners aren't populated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSkycell/src/ppSkycellCamera.c

    r34800 r35852  
    7373    }
    7474
     75    psArray *wcsref = NULL;             // Names of WCS reference images
     76    if (data->wcsrefName) {
     77      wcsref = fileList(data->wcsrefName);
     78      if (!wcsref) {
     79        psError(psErrorCodeLast(), false, "No WCSrefs provided.");
     80        psFree(images);
     81        psFree(masks);
     82        return(false);
     83      }
     84      if (wcsref->n != data->numInputs) {
     85        psError(PS_ERR_BAD_PARAMETER_SIZE, true, "Number of images (%ld) and wcsrefs (%ld) do not match",
     86                images->n, wcsref->n);
     87        psFree(images);
     88        psFree(masks);
     89        psFree(wcsref);
     90        return(false);
     91      }
     92    }
     93   
    7594    psMetadataAddStr(data->config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "Output root", data->outRoot);
    7695
     
    93112            }
    94113        }
     114
     115        if (data->wcsrefName) {
     116          fileArguments("WCSREF", wcsref->data[i], "Name of the WCS reference", data->config);
     117          pmFPAfile *wcsref = pmFPAfileDefineFromArgs(&status, data->config, "PPSKYCELL.WCSREF", "WCSREF");
     118          if (!status || !wcsref) {
     119            psError(PS_ERR_IO, false, "Failed to build file from PPSKYCELL.WCSREF");
     120            return(false);
     121          }
     122/*        if (!pmFPAfileBindFromArgs(&status, image, data->config, "PPSKYCELL.WCSREF", "WCSREF") || !status) { */
     123/*          psError(PS_ERR_IO, false, "Failed to build file from PPSKYCELL.WCSREF"); */
     124/*          return false; */
     125/*        } */
     126        }
     127       
    95128    }
    96129
Note: See TracChangeset for help on using the changeset viewer.