[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bad columns not masked properly?
Tom and I are discussing the way that the pipeline masks out portions
of each frame.
I mentioned the documentation of the "mask file", which
describes bad regions on an image. Each line in this file
contains 6 integers, like so:
1899 62 0 2028 1948 1953
Let me describe in detail the meaning of each integer.
Col 1: an ID number describing the region. The code which
examines flatfields and tries to find the bad regions
assigns ID numbers starting at 1 to the regions it
finds in each frame. Most of the regions it finds
are so small that they don't qualify for the
mask file, so the ID numbers which do appear
are essentially random.
Col 2: the number of bad connected bad pixels found in
the area. The way bad regions are found is like
so: given a threshold for "bad" values, the program
looks through an image for all "bad" pixels. It
connects all "bad" pixels which touch other "bad"
pixels -- these connected pixels define "bad regions."
There is a minimum number of connected pixels that
a "bad region" must have to be included in the
mask file.
When all the connected pixels in a bad region have
been identified, the program determines the rectangular
area which completely contains the connected pixels;
in other words, it finds the min and max row and col
values from the connected pixels. This rectangular
hull becomes the official "bad region" to be masked out.
Col 3: The minimum row of the rectangular hull containing a
bad region, in the trimmed version of the image.
Col 4: The maximum row of the rectangular hull, in the trimmed image.
Col 5: The minimum col of the rectangular hull, in the trimmed image.
Col 6: The maximum col of the rectangular hull, in the trimmed image.
Tom asked:
> OK, below I notice you did not do anything to the 62 - the total number of
> pixels patched out. Does the program care if this is not right? I assume
> not.
Correct. Once a mask has been created, the pipeline pays attention
only to the final 4 columns. The pipeline will set a flag for any
object detected within the rectangular hull defined in the mask file.
> How can you get 62 bad pixels out of this? Note that 62 is only
> divisible by 31. So the bad area can only be 1 x 62 or 2 x 31. Some
> creative geometry is required, I think! ;^)
Well, I was being lazy last night (while sitting in the dark in
the dome at RIT Observatory -- sigh). I knew (because I'd written
the code) that the count of connected bad pixels didn't matter;
only the boundaries of the region mattered. But no one else knew
that, of course.
Thanks for helping me to clarify things, Tom. I remember reading
"cookbooks" for both IRAF and AIPS when I was a grad student: not
manuals, really, but descriptions of the typical set of commands
one would use to reduce a night's data. Sounds like I need to write
a "cookbook" for the Mark IV pipeline ....
Michael