IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 9, 2014, 3:44:07 PM (12 years ago)
Author:
eugene
Message:

adding code to fit the images to the reference positions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/include/fakeastro.h

    r37471 r37477  
    99
    1010typedef struct {
     11  int   NfakeImage;
     12  int   NFAKEIMAGE;
     13  Image *fakeImage;
     14
     15  int   NtrueImage;
     16  int   NTRUEIMAGE;
     17  Image *trueImage;
     18} ImageInfo;
     19
     20typedef struct {
    1121  double R, D;
    1222  StarPar starpar;
     
    1626
    1727typedef struct {
     28  double Rref; // "reference" coordinate of the fake stars
     29  double Dref;
    1830  Average  average;
    1931  Measure  measure;
     
    2133  int found;
    2234} Stars;
     35
     36// structure to hold coordinate fitting terms
     37typedef struct {
     38    int Npts;
     39    int Nterms;
     40    int Norder;
     41    int Nsums;
     42    int Nelems;
     43    double **sum;
     44    double **xsum;
     45    double **ysum;
     46    double **xfit;
     47    double **yfit;
     48} CoordFit;
    2349
    2450/* used in find_matches, find_matches_refstars */
     
    3359# define DVO_MAX_PATH 1024
    3460
    35 char   ImageCat[DVO_MAX_PATH];
    3661char   GSCFILE[DVO_MAX_PATH];
    3762char   CATDIR[DVO_MAX_PATH];
     
    116141Image *make_fake_images (Image *image, int *nfakeImage);
    117142
    118 Image *fakeastro_images_region (Image *image, int *nimage, int *NIMAGE, Image *refImage, int NrefImage, SkyTable *skyTableInput, SkyTable *skyTableOutput, SkyRegion *region);
     143int fakeastro_images_region (ImageInfo *imageInfo, Image *refImage, int NrefImage, SkyTable *skyTableInput, SkyTable *skyTableOutput, SkyRegion *innerRegion);
    119144
    120145SkyRegion *get_image_patch (Image *image);
     
    135160float airmass (float secz_image, double ra, double dec, double st, double latitude);
    136161float azimuth (double ha, double dec, double latitude);
     162
     163int fit_fake_stars (Stars *stars, int Nstars, Image *image);
     164
     165double **array_init (int Nx, int Ny);
     166void array_free (double **array, int Nx);
     167CoordFit *fit_init (int order);
     168void fit_free (CoordFit *fit);
     169void fit_add (CoordFit *fit, double x1, double y1, double x2, double y2, double wt);
     170int fit_eval (CoordFit *fit);
     171void fit_apply (CoordFit *fit, double *x2, double *y2, double x1, double y1);
     172double **poly2d_dx (double **poly, int Nx, int Ny);
     173double **poly2d_dy (double **poly, int Nx, int Ny);
     174double **poly2d_copy (double **poly, int Nx, int Ny);
     175double poly2d_eval (double **poly, int Nx, int Ny, double x, double y);
     176int fit_apply_coords (CoordFit *fit, Coords *coords, int keepRef);
     177
     178int save_astrom_table ();
     179AstromOffsetTable *get_astrom_table ();
Note: See TracChangeset for help on using the changeset viewer.