source: trunk/inv_mask.pro @ 2

Last change on this file since 2 was 2, checked in by pinsard, 18 years ago

initial import from /usr/work/fvi/OPA/geomag/

File size: 1.0 KB
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5; NAME: inv_mask.pro
6;
7; PURPOSE: Puts 0 where mask is equal to 1 and vice versa
8;
9; CATEGORY: Function
10;
11; CALLING SEQUENCE: inv_mask, mask
12;
13; INPUTS:
14;          mask : mask field composed of 0 and 1 values 
15;
16; KEYWORD PARAMETERS: None
17;
18; OUTPUTS:
19;          mask : mask field composed of 0 and 1 values
20;                 inverted
21;
22; COMMON BLOCKS: None
23;
24; SIDE EFFECTS:
25;
26; RESTRICTIONS:
27;
28; EXAMPLE:
29;
30; MODIFICATION HISTORY: 11/99 A. Jouzeau
31;
32;-
33;------------------------------------------------------------
34;------------------------------------------------------------
35;------------------------------------------------------------
36FUNCTION inv_mask, mask
37printf, 40, ''
38printf, 40, 'Entering inv_mask'
39z = mask
40stop
41zero = where(mask EQ 0)
42one = where(mask EQ 1)
43z[zero] = 1
44z[one] = 0
45printf, 40, ''
46printf, 40, 'Inversion done'
47return, z
48END
Note: See TracBrowser for help on using the repository browser.