(file) Return to gapfill.h CVS log (file) (dir) Up to [Development] / JSOC / proj / libs / interpolate

File: [Development] / JSOC / proj / libs / interpolate / gapfill.h (download)
Revision: 1.5, Fri Jan 22 03:47:55 2016 UTC (7 years ago) by arta
Branch: MAIN
CVS Tags: Ver_LATEST, Ver_9-5, Ver_9-41, Ver_9-4, Ver_9-3, Ver_9-2, Ver_9-1, Ver_9-0, Ver_8-12, Ver_8-11, HEAD
Changes since 1.4: +4 -0 lines
Add Keh-Chengs lev1_dcon program to CVS. Had to do a bunch of clean-up to get rid of multiple definitions in proj/lev0 and proj/lev1.5_hmi.

#ifndef __GAPFILL_H
#define __GAPFILL_H

#include <omp.h>

struct fill_hash_struct {
  int nbad; // Number of bad points for this entry
  int hash0; // Hash value before modulus operation
  int nhit; // Number of times used
  int *wbad; // List of bad pixels for this entry
  double *coeff; // Saved coefficients
  float cnorm;
  float ierror;
  struct fill_hash_struct *next; // Next item in list

struct fill_struct {
  int order; // Interpolation order
  double *a0,*a00,*rh0,*a0t,*rh0t,acort00;
//double *a,*rh,*a1b,*a1r;
//int *wgood;
//int *wbad;
  int hashmod; // Modules for hash calculation
  int *hashcount; // How many of this hash value
  int ndiff; // Number of different masks seen
  struct fill_hash_struct **hashtable;
  omp_lock_t *locks; // To prevent reading while updating
  omp_lock_t *complocks; // To prevent redundant computations
  int method; // Value of input method
  char *filename; // File acor was read from

int init_fill(
  int method, // Interpolation method
  double pnoise, // Level of photon noise for trade-off
  int order, // Interpolation order. Generally odd.
  int targetx, // Target point in x (normally (order-1)/2)
  int targety, // Target point in y (normally (order-1)/2)
  struct fill_struct *pars, // Structure to save setup information etc.
  char **filenamep, // Pointer to name of file to read covariance from.
                   // Set to actual file used if method > 0.
  const char *path // to data files read by this function.


int free_fill(
  struct fill_struct *pars

int fgap_fill(
  struct fill_struct *pars, // Parameters from call of init_fill
  float *im, // Input image
  int nx, // Size of array in dimension adjacent in memory
  int ny, // Size of array in dimension not adjacent in memory
  int nlead, // Leading dimension of array nlead>=nx
  unsigned char *mask, // Mask is 0 data point is there
             // Mask is 1 if data point is not there and should be filled
             // Mask is 2 if data point is not there and should not be filled
  float *cnorm, // White noise magnification
  float *ierror // Estimated interpolation error

char *gapfill_version(); // Returns CVS version of gapfill.c


Karen Tian
Powered by
ViewCVS 0.9.4