IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 4, 2021, 6:05:18 PM (5 years ago)
Author:
eugene
Message:

merge changes from eam_branches/ipp-dev-20210817 (pmPattern updates, new inverse transform extra orders api, forward transform uses ORD, pmSourceIO_CMF.c.in conversion to pmFitsTableNew)

Location:
trunk/psModules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules

  • trunk/psModules/src/astrom/pmAstrometryUtils.c

    r35768 r41892  
    2323#include "pmAstrometryUtils.h"
    2424
     25static int transform_extra_orders = 3;
     26
     27int pmAstrometryGetExtraOrders (void) {
     28  return transform_extra_orders;
     29}
     30
     31int pmAstrometrySetExtraOrders (int orders) {
     32  transform_extra_orders = orders;
     33  return transform_extra_orders;
     34}
     35
    2536// this is used by the test output block
    2637static int Nout = 0;
     
    120131
    121132// convert a transformation L(x,y) to L'(x-xo,y-yo)
     133// is this used for an upward (e.g., chip->fpa) or a downward (fpa->chip) transform?
    122134psPlaneTransform *psPlaneTransformSetCenter (psPlaneTransform *output, psPlaneTransform *input, double Xo, double Yo)
    123135{
    124136
    125     // validate fit order
     137    // validate fit type:
     138    // polynomial in input transforms must match type -- and for now be ORD
     139    psAssert (input->x->type == PS_POLYNOMIAL_ORD, "fix for CHEB");
     140    psAssert (input->y->type == PS_POLYNOMIAL_ORD, "fix for CHEB");
    126141
    127142    if (output == NULL) {
    128         output = psPlaneTransformAlloc(input->x->nX, input->x->nY);
     143        output = psPlaneTransformAlloc(input->x->nX, input->x->nY, PS_POLYNOMIAL_ORD);
    129144    }
    130145
     
    169184
    170185// rotate a transformation L(x,y) by theta
    171 psPlaneTransform *psPlaneTransformRotate (psPlaneTransform *output, psPlaneTransform *input, double theta)
     186psPlaneTransform *psPlaneTransformRotate  (psPlaneTransform *output, psPlaneTransform *input, double theta)
    172187{
    173188    /* given the polynomial transformations:
     
    181196
    182197    if (output == NULL) {
    183         output = psPlaneTransformAlloc(input->x->nX, input->x->nY);
     198        // generate a new transform using the same order and type as the input
     199        output = psPlaneTransformAlloc(input->x->nX, input->x->nY, input->x->type);
    184200    }
    185201
     
    216232
    217233    // all coeffs and masks initially set to 0
    218     transform = psPlaneTransformAlloc (order, order);
     234    transform = psPlaneTransformAlloc (order, order, PS_POLYNOMIAL_ORD);
    219235
    220236    for (int i = 0; i <= order; i++) {
Note: See TracChangeset for help on using the changeset viewer.