| 4 | |
| 5 | |
| 6 | == Applying the mask == |
| 7 | |
| 8 | The delivered level-1 data pixels are not masked if bad - but come with separate mask files. If you wish to apply the mask to the data then you can use the supplied aplmask utility. It is recommended that you apply the mask to your data prior to analysis. An example how to do this: |
| 9 | |
| 10 | {{{ |
| 11 | aplmask -lev1 flightlines/level1b/flightline1.bil -mask flightlines/level1b/flightline1_mask.bil -output flightlines/level1b/flightline1_masked.bil |
| 12 | }}} |
| 13 | |
| 14 | This will create a masked level-1 file called flightline1_masked.bil where all the 'bad' pixels from the mask file flightline1_mask.bil are set to value '0'. 'Good' pixels will have the value from flightline1.bil. |
| 15 | |
| 16 | If you do not wish to mask out every bad pixel but just certain 'varieties', say only overflowed and underflowed pixels, then you can use the '-flags' option. Overflows and underflows have values 1 and 2 in the mask file, and so the following command will only mask these pixels: |
| 17 | |
| 18 | {{{ |
| 19 | aplmask -lev1 flightlines/level1b/flightline1.bil -mask flightlines/level1b/flightline1_mask.bil -output flightlines/level1b/flightline1_masked.bil -flags 1 2 |
| 20 | }}} |
| 21 | |
| 22 | Note that the flags are based on bit values. This means that if a pixel has mask value 10 (smear corrected and overflown) it will be masked out using the above command. To see what pixel values in the mask file represent see [wiki:FAQ/aplmask here]. |