@@ -25,7 +25,7 @@ public class Histogram {
25
25
26
26
private int [] hist ;
27
27
private double histMin ;
28
- private double histBinsiz ;
28
+ private double histBinsize ;
29
29
private double irafMin ;
30
30
private double irafMax ;
31
31
@@ -62,7 +62,7 @@ public Histogram(float[] float1dArray, double datamin, double datamax) {
62
62
while (true ) {
63
63
64
64
boolean redo_flag = false ;
65
- histBinsiz =getHistBinSize (histMax );
65
+ histBinsize =getHistBinSize (histMax );
66
66
//reintialize the hist to 0
67
67
Arrays .fill (hist , 0 );
68
68
int underflowCount = 0 ;
@@ -71,7 +71,7 @@ public Histogram(float[] float1dArray, double datamin, double datamax) {
71
71
{
72
72
if (!Double .isNaN (float1dArray [k ]))
73
73
{
74
- int i = (int ) ((float1dArray [k ] - histMin ) / histBinsiz );
74
+ int i = (int ) ((float1dArray [k ] - histMin ) / histBinsize );
75
75
if (i <0 )
76
76
{
77
77
//redo_flag = true; /* hist_min was bad */
@@ -123,8 +123,8 @@ else if (i>HISTSIZ2)
123
123
124
124
if ((histMaxIndex - histMinIndex ) < HISTSIZ ) {
125
125
126
- histMax = (histMaxIndex * histBinsiz ) + histMin ;
127
- histMin = (histMinIndex * histBinsiz ) + histMin ;
126
+ histMax = (histMaxIndex * histBinsize ) + histMin ;
127
+ histMin = (histMinIndex * histBinsize ) + histMin ;
128
128
redo_flag = true ; /* we can spread it out by factor of 2 */
129
129
}
130
130
} else {
@@ -203,7 +203,7 @@ private void printeDebugInfo(double hist_max, int underFlowCount, int overFlowCo
203
203
if (SUTDebug .isDebug ()) {
204
204
System .out .println ("histMin = " + histMin );
205
205
System .out .println ("hist_max = " + hist_max );
206
- System .out .println ("histBinsiz = " + histBinsiz );
206
+ System .out .println ("histBinsize = " + histBinsize );
207
207
208
208
209
209
System .out .println ("underFlowCount = " + underFlowCount +
@@ -261,12 +261,12 @@ public double get_pct(double ra_value, boolean round_up) {
261
261
System .out .println ("goodpix = " + goodpix
262
262
+ " goal = " + goal
263
263
+ " i = " + i
264
- + " histBinsiz = " + histBinsiz );
264
+ + " histBinsize = " + histBinsize );
265
265
}
266
266
if (round_up )
267
- return ((i + 1.0 ) * histBinsiz + histMin );
267
+ return ((i + 1.0 ) * histBinsize + histMin );
268
268
else
269
- return ((i ) * histBinsiz + histMin );
269
+ return ((i ) * histBinsize + histMin );
270
270
}
271
271
272
272
/**
@@ -298,15 +298,15 @@ public double getDNMax() {
298
298
* @return The DN value in the image corresponding to the specified bin
299
299
*/
300
300
public double getDNfromBin (int bin ) {
301
- return (bin * histBinsiz + histMin );
301
+ return (bin * histBinsize + histMin );
302
302
}
303
303
304
304
/**
305
305
* @param dn The DN value
306
306
* @return The histogram index corresponding to the DN value
307
307
*/
308
308
public int getBinfromDN (double dn ) {
309
- int bin = (int ) ((dn - histMin ) / histBinsiz );
309
+ int bin = (int ) ((dn - histMin ) / histBinsize );
310
310
if (bin >= HISTSIZ2 )
311
311
bin = HISTSIZ2 - 1 ;
312
312
if (bin < 0 )
@@ -321,7 +321,7 @@ public int getBinfromDN(double dn) {
321
321
*/
322
322
public int getBINfromPercentile (double pct , boolean round_up ) {
323
323
double dn = get_pct (pct , round_up );
324
- int bin = (int ) ((dn - histMin ) / histBinsiz );
324
+ int bin = (int ) ((dn - histMin ) / histBinsize );
325
325
if (bin >= HISTSIZ2 )
326
326
bin = HISTSIZ2 - 1 ;
327
327
if (bin < 0 )
@@ -336,7 +336,7 @@ public int getBINfromPercentile(double pct, boolean round_up) {
336
336
*/
337
337
public int getBINfromSigma (double sigma , boolean round_up ) {
338
338
double dn = get_sigma (sigma , round_up );
339
- int bin = (int ) ((dn - histMin ) / histBinsiz );
339
+ int bin = (int ) ((dn - histMin ) / histBinsize );
340
340
if (bin >= HISTSIZ2 )
341
341
bin = HISTSIZ2 - 1 ;
342
342
if (bin < 0 )
@@ -361,14 +361,14 @@ public double[] getTblArray() {
361
361
while (hist_index < HISTSIZ2 && tblindex < 255 ) {
362
362
363
363
if (accum >= next_goal ) {
364
- tbl [tblindex ++] = (hist_index * histBinsiz + histMin );
364
+ tbl [tblindex ++] = (hist_index * histBinsize + histMin );
365
365
next_goal += goodpix_255 ;
366
366
} else {
367
367
accum += hist [hist_index ++];
368
368
}
369
369
}
370
370
while (tblindex < 255 )
371
- tbl [tblindex ++] = hist_index * histBinsiz + histMin ;
371
+ tbl [tblindex ++] = hist_index * histBinsize + histMin ;
372
372
tbl [255 ] = Double .MAX_VALUE ;
373
373
return tbl ;
374
374
}
0 commit comments