Commit 4f3cc1d9 authored by Thomas White's avatar Thomas White
Browse files

Remove I0 stuff

Nothing used it, and it can't really be useful for anything.  Use 'osf' instead.
parent 77aa89c8
...@@ -459,15 +459,6 @@ int hdf5_read(struct hdfile *f, struct image *image, int satcorr) ...@@ -459,15 +459,6 @@ int hdf5_read(struct hdfile *f, struct image *image, int satcorr)
/* Read wavelength from file */ /* Read wavelength from file */
image->lambda = get_wavelength(f); image->lambda = get_wavelength(f);
image->i0 = get_i0(f);
if ( image->i0 < 0.0 ) {
ERROR("Couldn't read incident intensity - using 1.0.\n");
image->i0 = 1.0;
image->i0_available = 0;
} else {
image->i0_available = 1;
}
if ( satcorr ) debodge_saturation(f, image); if ( satcorr ) debodge_saturation(f, image);
return 0; return 0;
......
...@@ -91,8 +91,6 @@ typedef struct _imagefeaturelist ImageFeatureList; ...@@ -91,8 +91,6 @@ typedef struct _imagefeaturelist ImageFeatureList;
* double lambda; * double lambda;
* double div; * double div;
* double bw; * double bw;
* double i0;
* int i0_available;
* double osf; * double osf;
* double profile_radius; * double profile_radius;
* int pr_dud; * int pr_dud;
...@@ -157,9 +155,6 @@ struct image { ...@@ -157,9 +155,6 @@ struct image {
double lambda; /* Wavelength in m */ double lambda; /* Wavelength in m */
double div; /* Divergence in radians */ double div; /* Divergence in radians */
double bw; /* Bandwidth as a fraction */ double bw; /* Bandwidth as a fraction */
double i0; /* Incident intensity */
int i0_available; /* 0 if f0 wasn't available
* from the input. */
double osf; /* Overall scaling factor */ double osf; /* Overall scaling factor */
double profile_radius; /* Radius of reflection */ double profile_radius; /* Radius of reflection */
int pr_dud; /* Post refinement failed */ int pr_dud; /* Post refinement failed */
......
...@@ -245,12 +245,6 @@ void write_chunk(FILE *ofh, struct image *i, struct hdfile *hdfile, int f) ...@@ -245,12 +245,6 @@ void write_chunk(FILE *ofh, struct image *i, struct hdfile *hdfile, int f)
} }
if ( i->i0_available ) {
fprintf(ofh, "I0 = %7.5f (arbitrary units)\n", i->i0);
} else {
fprintf(ofh, "I0 = invalid\n");
}
fprintf(ofh, "photon_energy_eV = %f\n", fprintf(ofh, "photon_energy_eV = %f\n",
J_to_eV(ph_lambda_to_en(i->lambda))); J_to_eV(ph_lambda_to_en(i->lambda)));
...@@ -341,8 +335,6 @@ int read_chunk(FILE *fh, struct image *image) ...@@ -341,8 +335,6 @@ int read_chunk(FILE *fh, struct image *image)
if ( find_start_of_chunk(fh) ) return 1; if ( find_start_of_chunk(fh) ) return 1;
image->i0_available = 0;
image->i0 = 1.0;
image->lambda = -1.0; image->lambda = -1.0;
image->features = NULL; image->features = NULL;
image->reflections = NULL; image->reflections = NULL;
...@@ -390,11 +382,6 @@ int read_chunk(FILE *fh, struct image *image) ...@@ -390,11 +382,6 @@ int read_chunk(FILE *fh, struct image *image)
} }
} }
if ( strncmp(line, "I0 = ", 5) == 0 ) {
image->i0 = atof(line+5);
image->i0_available = 1;
}
if ( sscanf(line, "astar = %f %f %f", &u, &v, &w) == 3 ) { if ( sscanf(line, "astar = %f %f %f", &u, &v, &w) == 3 ) {
as.u = u*1e9; as.v = v*1e9; as.w = w*1e9; as.u = u*1e9; as.v = v*1e9; as.w = w*1e9;
have_as = 1; have_as = 1;
......
...@@ -493,7 +493,6 @@ int main(int argc, char *argv[]) ...@@ -493,7 +493,6 @@ int main(int argc, char *argv[])
image.div = beam->divergence; image.div = beam->divergence;
image.bw = beam->bandwidth; image.bw = beam->bandwidth;
image.profile_radius = 0.003e9; image.profile_radius = 0.003e9;
image.i0_available = 0;
image.filename = malloc(256); image.filename = malloc(256);
image.copyme = NULL; image.copyme = NULL;
......
...@@ -555,8 +555,6 @@ int main(int argc, char *argv[]) ...@@ -555,8 +555,6 @@ int main(int argc, char *argv[])
image.filename = NULL; image.filename = NULL;
image.features = NULL; image.features = NULL;
image.flags = NULL; image.flags = NULL;
image.i0 = 1.0;
image.i0_available = 1;
powder = calloc(image.width*image.height, sizeof(*powder)); powder = calloc(image.width*image.height, sizeof(*powder));
......
...@@ -296,7 +296,6 @@ int main(int argc, char *argv[]) ...@@ -296,7 +296,6 @@ int main(int argc, char *argv[])
image.bw = 0.01; image.bw = 0.01;
image.m = 0.0; image.m = 0.0;
image.profile_radius = 0.005e9; image.profile_radius = 0.005e9;
image.i0_available = 0;
image.filename = malloc(256); image.filename = malloc(256);
cell = cell_new_from_parameters(10.0e-9, 10.0e-9, 10.0e-9, cell = cell_new_from_parameters(10.0e-9, 10.0e-9, 10.0e-9,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment