IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42089 for trunk/psLib/src/fits


Ignore:
Timestamp:
Feb 28, 2022, 2:43:25 PM (4 years ago)
Author:
eugene
Message:

plug a leak in psFitsTableNew.c; fix implementation of FITS_SCALE_ASINH_MANUAL; add option to reweight the errors in LMM; compile-time option to activate a hard-coded random seed (only needed for psLib testing)

Location:
trunk/psLib/src/fits
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/fits/psFits.h

    r31633 r42089  
    6060    PS_FITS_SCALE_ASINH_STDEV_NEGATIVE, ///< Do asinh scaling, auto-scale to sample stdev, place mean at upper limit
    6161    PS_FITS_SCALE_ASINH_STDEV_BOTH,     ///< Do asinh scaling, auto-scale to sample stdev, place mean at middle
    62     PS_FITS_SCALE_ASINH_MANUAL          ///< Manual scaling after doing asinh scaling.
     62    PS_FITS_SCALE_ASINH_MANUAL          ///< Manual scaling after doing asinh scaling.(use specified BSCALE, BZERO, BOFFSET, BSOFTEN)
    6363} psFitsScaling;
    6464
  • trunk/psLib/src/fits/psFitsImage.c

    r41521 r42089  
    744744      }
    745745    }   
    746     // Remove any BSOFTENvalues that exist in the header if we are not using that scaling anymore
     746    // Remove any BSOFTEN values that exist in the header if we are not using that scaling anymore
    747747    if (options && (!((options->scaling == PS_FITS_SCALE_ASINH_RANGE)||
    748748                      (options->scaling == PS_FITS_SCALE_ASINH_MANUAL)||
  • trunk/psLib/src/fits/psFitsScale.c

    r41521 r42089  
    963963        *bzero = options->bzero;
    964964        *boffset = options->boffset;
     965        break;
     966      case PS_FITS_SCALE_ASINH_MANUAL:
     967        *bscale = options->bscale;
     968        *bzero = options->bzero;
     969        *boffset = options->boffset;
     970        *bsoften = options->bsoften;
    965971        break;
    966972      default:
  • trunk/psLib/src/fits/psFitsTableNew.c

    r41896 r42089  
    9797freeTable(psFitsTable *table)
    9898{
     99    if (!table) return;
    99100    for (int col = 0; col < table->numCols; col++) {
    100101        psFitsTableColumn *column = &table->columns[col];
     
    176177{
    177178    // add any element frees here
     179    if (!column) return;
     180
     181    psFree (column->name);
    178182    return;
    179183}
     
    195199    psFitsTableColumn *column = psFitsTableColumnAlloc (name, type);
    196200    psArrayAdd (tableColumns, 10, column);
     201    psFree (column);
    197202    return true;
    198203}
Note: See TracChangeset for help on using the changeset viewer.