def make_xtalk_mask(mask):
col, row = mask.nonzero()<EOL>row_plus_one = row + <NUM_LIT:1><EOL>del_index = np.where(row_plus_one > <NUM_LIT>)<EOL>row_plus_one = np.delete(row_plus_one, del_index)<EOL>col_plus_one = np.delete(col.copy(), del_index)<EOL>row_minus_one = row - <NUM_LIT:1><EOL>del_index = np.where(row_minus_one > <NUM_LIT>)<EOL>row_minus_one = np.delete(row_minus_one, del_index)<EOL>col_minus_one = np.delete(col.copy(), del_index)<EOL>col = np.concatenate((col_plus_one, col_minus_one))<EOL>row = np.concatenate((row_plus_one, row_minus_one))<EOL>return make_pixel_mask_from_col_row(col + <NUM_LIT:1>, row + <NUM_LIT:1>)<EOL>
Generate xtalk mask (row - 1, row + 1) from pixel mask.

Parameters
----------
mask : ndarray
    Pixel mask.

Returns
-------
ndarray
    Xtalk mask.

Example
-------
Input:
[[1 0 0 0 0 0 1 0 0 0 ... 0 0 0 0 1 0 0 0 0 0]
 [0 0 0 1 0 0 0 0 0 1 ... 0 1 0 0 0 0 0 1 0 0]
 ...
 [1 0 0 0 0 0 1 0 0 0 ... 0 0 0 0 1 0 0 0 0 0]
 [0 0 0 1 0 0 0 0 0 1 ... 0 1 0 0 0 0 0 1 0 0]]

Output:
[[0 1 0 0 0 1 0 1 0 0 ... 0 0 0 1 0 1 0 0 0 1]
 [0 0 1 0 1 0 0 0 1 0 ... 1 0 1 0 0 0 1 0 1 0]
 ...
 [0 1 0 0 0 1 0 1 0 0 ... 0 0 0 1 0 1 0 0 0 1]
 [0 0 1 0 1 0 0 0 1 0 ... 1 0 1 0 0 0 1 0 1 0]]