Go to the documentation of this file.
11 int main(
int argc,
char* argv[]) {
19 input_binfile.
open(argv[1]);
22 int32 n_input_bins = input_binfile.
read(argv[3]);
29 float32 *inData = (float32 *) calloc(n_input_bins,
sizeof (float32));
32 n_input_bins = input_binfile.
read(inData, inBinList);
35 int32 *binsToCopy = (int32 *) calloc(n_input_bins,
sizeof (float32));
39 int32 n_speckle_bins, *speckle_bins;
40 float32 *stdev, *
mean;
41 fp = fopen(argv[2],
"rb");
42 fread(&n_speckle_bins,
sizeof (int32), 1, fp);
43 speckle_bins = (int32 *) calloc(n_speckle_bins,
sizeof (int32));
44 mean = (float32 *) calloc(n_speckle_bins,
sizeof (float32));
45 stdev = (float32 *) calloc(n_speckle_bins,
sizeof (float32));
46 for (
size_t i = 0;
i < n_speckle_bins;
i++) {
47 fread(&speckle_bins[
i],
sizeof (int32), 1, fp);
48 fread(&
mean[
i],
sizeof (float32), 1, fp);
49 fread(&stdev[
i],
sizeof (float32), 1, fp);
56 int32 n_bins_removed = 0;
57 for (
size_t j = 0;
j < n_speckle_bins;
j++) {
59 for (
size_t i = lasti;
i < n_input_bins;
i++) {
60 if (inBinList[
i].bin_num == speckle_bins[
j]) {
68 if (inBinList[
i].bin_num > speckle_bins[
j]) {
74 int32 n_output_bins = 0;
75 for (
size_t i = 0;
i < n_input_bins;
i++) {
76 if (inBinList[
i].bin_num != -1) {
77 binsToCopy[n_output_bins++] =
i;
103 char *fullprodlist = (
char *) malloc(input_binfile.
query());
106 input_binfile.
query(fullprodlist);
109 output_binfile.
copy(fullprodlist, n_output_bins, binsToCopy,
110 inBinList, &input_binfile);
113 output_binfile.
close();
114 input_binfile.
close();
123 printf(
"--Number of input bins: %8d\n", n_input_bins);
124 printf(
"--Number of bins removed: %8d\n", n_bins_removed);
125 printf(
"--Percent removed: %7.2f\n", n_bins_removed * 100. / n_input_bins);
127 cout <<
"Normal Completion" << endl << endl;
float mean(float *xs, int sample_size)
void get_time(char *pr_time)
int create(const char *l3b_filename, int32_t nrows)
int copy(char *product_list, int32_t nwrite, int32_t *binsToCopy, Hdf::binListStruct *inBinList, Hdf::hdf4_bin *input_binfile)
int open(const char *l3b_filename)
int main(int argc, char *argv[])
int read(float *data, binListStruct *binList)
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")