23.04.2015 Views

ISOCAM Interactive Analysis User's Manual Version 5.0 - ISO - ESA

ISOCAM Interactive Analysis User's Manual Version 5.0 - ISO - ESA

ISOCAM Interactive Analysis User's Manual Version 5.0 - ISO - ESA

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

196 CHAPTER 16. DATA STRUCTURE MANIPULATION<br />

Alternatively, you can extract the dead pixels from an SCD directly:<br />

CIA> dead_mask = scd_get( ’mask.dead’, ’CSCD143006010110_97092611592803’ )<br />

16.4.2 Modifying the MASK<br />

Following on from Section 16.4.1 we will now create and modify our own MASK.<br />

1. Firstly, create an empty array that will hold our MASK, let’s call this our mask. We will<br />

makeitthesamesizeasoriginal mask:<br />

CIA> our_mask = bytarr(32,32,19)<br />

2. Suppose that the first column of all our CAM IMAGEs is blind, we can set the first column<br />

pixels to the appropriate value with put mask.<br />

CIA> our_mask[0,*,*] = put_mask( ’blind’, our_mask[0,*,*] )<br />

3. Now look at the first element in our mask. This should be a blind pixel.<br />

CIA> print, our_mask[0]<br />

16<br />

Since it is a blind pixel it has a value of 16.<br />

4. Our MASK can be added to a CIA structure with scd put. The keyword put decides how<br />

out MASK is inserted into the structure. For example, to combine the MASK bits in our<br />

MASK with the CIA structure’s existing MASK bits, i.e an OR operation:<br />

CIA> scd_put, ’mask’, mask, ’CSCD143006010110_97092611592803’, put=’put’<br />

Actually this is the default behaviour of scd put. To replace the existing MASK with the<br />

input MASK then put should be set to ‘set’. Setting put to ‘clear’ will cause the existing<br />

MASK bits to be set to zero (i.e. cleared) where the input MASK bits are one.<br />

Alternatively, we can create a MASK and put it directly into a structure, merging it with<br />

the structure’s MASK. The structure could be a PDS or ordinary structure extracted from a<br />

CIA structure, e.g.<br />

CIA> struct = scd_extract( ’CSCD143006010110_97092611592803’ )<br />

Now follow the following procedure.<br />

1. Create a variable to hold our MASK.<br />

CIA> our_mask = bytarr(32,32,19)<br />

2. set the pixels we wanted masked to 1. Again we use the example that the first column of<br />

all our CAM IMAGEs are blind.<br />

CIA> our_mask[0,*,*] = 1<br />

3. Call ia put mask to put our mask into struct, converting the pixels of value of 1 to the<br />

appropriate value for blind pixels.<br />

CIA> ia_put_mask, ’blind’, struct, our_mask

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!