c corner.fh c c All stuff for corner correction routines c This common block should _only_ be included in the cnr_* routines c Size of correction table array integer MAXBIN, MAXHISTO parameter (MAXBIN=384, MAXHISTO=10) c corfac array of multiplicative correction factors c cormax maximum value c xmap, ymap Pixel coordinates XDET, YDET are mapped to c correction table coordinates by multiplying c by xmap, ymap c histo_bin width of histogram bins c ncfcx, ncfcy array dimensions (fast, slow) c kstatus = +1 if table has been read from file c = +2 if mapping parameters have been set up c img_xdet, img_ydet c full image size corresponding to correction file c actual image may be half this if BINNED c max_xdet, max_ydet c maximum detector coordinates from MTZ file c nhisto number of histogram bins on correction factor c histo_counts count of observations corrected in each bin c c swap .true. if bytes need to be swapped when reading c table from file c flip .true. if file table needed to be flipped x<->y c for Mosflm convention common /corner/ corfac(MAXBIN, MAXBIN), cormax, xmap, ymap, $ histo_bin, $ ncfcx, ncfcy, kstatus, $ img_xdet, img_ydet, $ max_xdet, max_ydet, $ nhisto, histo_counts(MAXHISTO), ncnall, ncncor, $ swap, flip c real corfac, cormax, xmap, ymap, histo_bin integer img_xdet, img_ydet, max_xdet, max_ydet, $ ncfcx, ncfcy, kstatus, nhisto, histo_counts, $ ncnall, ncncor logical litendfile, swap, flip common /cornerc/ cornerfilename save /corner/, /cornerc/