Loading ...
Sorry, an error occurred while loading the content.

Re: [ccd-newastro] Re: Calculating average brightness in an area of a fits image

Expand Messages
  • Mark Striebeck
    After spending many weeks focusing on my mount and guiding accuracy, I could finally take some images. eXcalibrator gave me the following values: Green: 1.662
    Message 1 of 23 , Jun 2 12:17 AM
    • 0 Attachment
      After spending many weeks focusing on my mount and guiding accuracy, I
      could finally take some images.

      eXcalibrator gave me the following values:

      Green: 1.662
      Blue: 1.970
      Red: 1

      Which sounds extreme.

      The last 2 nights, I took images of M51:
      Lum: 10x10min (binned 1x1)
      RGB: 10x7.5min (binned 2x2)

      When I combined these images with the same weights, I got this image:
      https://lh6.googleusercontent.com/cS88vNQCDLaXKJhogYIuB0KEo0CMReLIjTfJnrzVekIw=w737-h590-no

      When I used the weights from above, I get this image:
      https://lh6.googleusercontent.com/E749SZJEL3JepyckXufBrDiQX-if9elWPdE-1NMBKSHc=w737-h590-no

      Seems as if eXcalibrator was pretty accurate after all! It just shows how
      much it sucks to live in such a light polluted area :-(

      If you are interested in the individual images and histograms, check
      http://mstriebeck-astrophotography.blogspot.com/2013/06/measuring-white-balance.html

      So, now where I know these values, is it better to adjust the exposure
      times accordingly? Or to keep the individual exposures the same and apply
      these weights when combining the images?

      MarkS


      On Sun, Apr 14, 2013 at 8:54 AM, Mark Striebeck <mark.striebeck@...>wrote:

      > Hi Bob,
      >
      > On Sun, Apr 14, 2013 at 1:07 AM, Bob Franke <bfranke@...> wrote:
      >
      >> **
      >>
      >>
      >> Hi Mark,
      >>
      >> With a (b-v) magnitude of 0.676, 20LMi is a good star for color
      >> calibration.
      >>
      > Thanks - I didn't have the time yet to figure out how to do the
      > measurement with CCDStack.
      >
      >>
      >> M44 is covered by the Sloan Digital Sky Survey. eXcalibrator should get
      >> excellent results with the SDSS-DR7 or DR9 stars. However, the numbers you
      >> stated are a bit extreme. What camera and filters are you using?
      >>
      >
      > I'm using an H694 from Starlight Xpress and Baader filters. I am imaging
      > from a very light polluted area, so I expected that red will be quite
      > dominant. Just not as much as it did.
      >
      > The last couple of nights, I imaged the Leo triple and wanted to give it
      > another try with XCalibrator (just downloaded the 4.01 version). But every
      > time I use one of the images as for the WCS file, I get a "function
      > loadFitsKeyWords failed for WCS File." error. I took the images with the
      > camera add-on from TheSkyX, i.e. the WCS headers should be filled in.
      >
      > Thanks
      > MarkS
      >
      >>
      >> Cheers,
      >>
      >> Bob
      >>
      >> --- In ccd-newastro@yahoogroups.com, Mark Striebeck <mark.striebeck@...>
      >> wrote:
      >> >
      >> > Thanks for the reply Bob,
      >> >
      >> > I have this particular star from this page
      >> > http://starizona.com/acb/ccd/advtheorycolor.aspx (and I've seen this
      >> same
      >> > table in a couple of other places). Is there somewhere a better list for
      >> > suitable stars?
      >> >
      >> > To be honest: I tried XCalibrator for this a few days ago with an image
      >> of
      >> > M44. But the values that I got out were pretty extreme (I got a factor
      >> of
      >> > more then 2 for both green and blue). So, I wanted to do a manual
      >> > verification.
      >> >
      >> > MarkS
      >> >
      >> >
      >> > On Tue, Apr 9, 2013 at 11:15 AM, Bob Franke <bfranke@...> wrote:
      >> >
      >> > > **
      >>
      >> > >
      >> > >
      >> > > Hello Mark,
      >> > >
      >> > > You are on the right track, you just need proper data and tools. When
      >> you
      >> > > said G3 star, I assume that was a typo. You need to use G2V stars.
      >> However,
      >> > > all G2V stars are not equal. Some are slightly yellow and others
      >> slightly
      >> > > blue. Use stars that have a (b-v) magnitude close to 0.65.
      >> > >
      >> > > Here are a couple of the freeware options for determining the color
      >> ratios
      >> > > for your image train.
      >> > >
      >> > > Christian Buil's IRIS program as an aperture photometry tool. This is
      >> > > excellent for comparing star flux to determine color balance. It gets
      >> the
      >> > > same results as Source Extractor.
      >> > >
      >> > > Then, of course, there's my freeware eXcalibrator. eXcalibrator can
      >> use
      >> > > the Sloan Digital Sky Survey database to identify white stars in an
      >> image.
      >> > > The program then uses Source Extractor to measure the star flux in
      >> the red,
      >> > > green and blue images. Finally, eXcalibrator presents RGB color
      >> ratios to
      >> > > make the identified stars white.
      >> > >
      >> > > Here's a webpage to determine if a specific area of the sky is
      >> covered by
      >> > > the Sloan survey.
      >> > > http://www.sdss3.org/dr9/index.php#coverage
      >> > >
      >> > > Here's a link to my eXcalibrator page
      >> > > http://bf-astro.com/eXcalibrator/excalibrator.htm
      >> > >
      >> > > Hope this helps,
      >> > > Bob
      >> > >
      >> > >
      >> > > --- In ccd-newastro@yahoogroups.com, Mark Striebeck <mark.striebeck@>
      >> > > wrote:
      >> > > >
      >> > > > Hi,
      >> > > >
      >> > > > To determine the white balance of my setup, I took a red, green and
      >> blue
      >> > > > image of 20LMi (a G3 star). But I am struggling to find a way to
      >> measure
      >> > > > the average brightness in the star. The Fits Liberator gives me the
      >> mean
      >> > > > for the entire image, but not for a smaller area. Anybody knows a
      >> way to
      >> > > > get this?
      >> > > >
      >> > > > Thanks
      >> > > > MarkS
      >> > > >
      >> > > >
      >> > > > [Non-text portions of this message have been removed]
      >> > > >
      >> > >
      >> > >
      >> > >
      >> >
      >> >
      >> > [Non-text portions of this message have been removed]
      >> >
      >>
      >>
      >>
      >
      >


      [Non-text portions of this message have been removed]
    • Pete Su
      I would think that if the imbalance is mostly from LP gradients then rebalancing each picture would be the right way to go. If your sky is like my sky, the
      Message 2 of 23 , Jun 2 7:49 AM
      • 0 Attachment
        I would think that if the imbalance is mostly from LP gradients then
        rebalancing each picture would be the right way to go.

        If your sky is like my sky, the gradients are very different in different
        areas.

        Pete


        On Sun, Jun 2, 2013 at 3:17 AM, Mark Striebeck <mark.striebeck@...>wrote:

        > After spending many weeks focusing on my mount and guiding accuracy, I
        > could finally take some images.
        >
        > eXcalibrator gave me the following values:
        >
        > Green: 1.662
        > Blue: 1.970
        > Red: 1
        >
        > Which sounds extreme.
        >
        > The last 2 nights, I took images of M51:
        > Lum: 10x10min (binned 1x1)
        > RGB: 10x7.5min (binned 2x2)
        >
        > When I combined these images with the same weights, I got this image:
        >
        > https://lh6.googleusercontent.com/cS88vNQCDLaXKJhogYIuB0KEo0CMReLIjTfJnrzVekIw=w737-h590-no
        >
        > When I used the weights from above, I get this image:
        >
        > https://lh6.googleusercontent.com/E749SZJEL3JepyckXufBrDiQX-if9elWPdE-1NMBKSHc=w737-h590-no
        >
        > Seems as if eXcalibrator was pretty accurate after all! It just shows how
        > much it sucks to live in such a light polluted area :-(
        >
        > If you are interested in the individual images and histograms, check
        >
        > http://mstriebeck-astrophotography.blogspot.com/2013/06/measuring-white-balance.html
        >
        > So, now where I know these values, is it better to adjust the exposure
        > times accordingly? Or to keep the individual exposures the same and apply
        > these weights when combining the images?
        >
        > MarkS
        >
        >
        > On Sun, Apr 14, 2013 at 8:54 AM, Mark Striebeck <mark.striebeck@...
        > >wrote:
        >
        > > Hi Bob,
        > >
        > > On Sun, Apr 14, 2013 at 1:07 AM, Bob Franke <bfranke@...>
        > wrote:
        > >
        > >> **
        > >>
        > >>
        > >> Hi Mark,
        > >>
        > >> With a (b-v) magnitude of 0.676, 20LMi is a good star for color
        > >> calibration.
        > >>
        > > Thanks - I didn't have the time yet to figure out how to do the
        > > measurement with CCDStack.
        > >
        > >>
        > >> M44 is covered by the Sloan Digital Sky Survey. eXcalibrator should get
        > >> excellent results with the SDSS-DR7 or DR9 stars. However, the numbers
        > you
        > >> stated are a bit extreme. What camera and filters are you using?
        > >>
        > >
        > > I'm using an H694 from Starlight Xpress and Baader filters. I am imaging
        > > from a very light polluted area, so I expected that red will be quite
        > > dominant. Just not as much as it did.
        > >
        > > The last couple of nights, I imaged the Leo triple and wanted to give it
        > > another try with XCalibrator (just downloaded the 4.01 version). But
        > every
        > > time I use one of the images as for the WCS file, I get a "function
        > > loadFitsKeyWords failed for WCS File." error. I took the images with the
        > > camera add-on from TheSkyX, i.e. the WCS headers should be filled in.
        > >
        > > Thanks
        > > MarkS
        > >
        > >>
        > >> Cheers,
        > >>
        > >> Bob
        > >>
        > >> --- In ccd-newastro@yahoogroups.com, Mark Striebeck <mark.striebeck@
        > ...>
        > >> wrote:
        > >> >
        > >> > Thanks for the reply Bob,
        > >> >
        > >> > I have this particular star from this page
        > >> > http://starizona.com/acb/ccd/advtheorycolor.aspx (and I've seen this
        > >> same
        > >> > table in a couple of other places). Is there somewhere a better list
        > for
        > >> > suitable stars?
        > >> >
        > >> > To be honest: I tried XCalibrator for this a few days ago with an
        > image
        > >> of
        > >> > M44. But the values that I got out were pretty extreme (I got a factor
        > >> of
        > >> > more then 2 for both green and blue). So, I wanted to do a manual
        > >> > verification.
        > >> >
        > >> > MarkS
        > >> >
        > >> >
        > >> > On Tue, Apr 9, 2013 at 11:15 AM, Bob Franke <bfranke@...> wrote:
        > >> >
        > >> > > **
        > >>
        > >> > >
        > >> > >
        > >> > > Hello Mark,
        > >> > >
        > >> > > You are on the right track, you just need proper data and tools.
        > When
        > >> you
        > >> > > said G3 star, I assume that was a typo. You need to use G2V stars.
        > >> However,
        > >> > > all G2V stars are not equal. Some are slightly yellow and others
        > >> slightly
        > >> > > blue. Use stars that have a (b-v) magnitude close to 0.65.
        > >> > >
        > >> > > Here are a couple of the freeware options for determining the color
        > >> ratios
        > >> > > for your image train.
        > >> > >
        > >> > > Christian Buil's IRIS program as an aperture photometry tool. This
        > is
        > >> > > excellent for comparing star flux to determine color balance. It
        > gets
        > >> the
        > >> > > same results as Source Extractor.
        > >> > >
        > >> > > Then, of course, there's my freeware eXcalibrator. eXcalibrator can
        > >> use
        > >> > > the Sloan Digital Sky Survey database to identify white stars in an
        > >> image.
        > >> > > The program then uses Source Extractor to measure the star flux in
        > >> the red,
        > >> > > green and blue images. Finally, eXcalibrator presents RGB color
        > >> ratios to
        > >> > > make the identified stars white.
        > >> > >
        > >> > > Here's a webpage to determine if a specific area of the sky is
        > >> covered by
        > >> > > the Sloan survey.
        > >> > > http://www.sdss3.org/dr9/index.php#coverage
        > >> > >
        > >> > > Here's a link to my eXcalibrator page
        > >> > > http://bf-astro.com/eXcalibrator/excalibrator.htm
        > >> > >
        > >> > > Hope this helps,
        > >> > > Bob
        > >> > >
        > >> > >
        > >> > > --- In ccd-newastro@yahoogroups.com, Mark Striebeck
        > <mark.striebeck@>
        > >> > > wrote:
        > >> > > >
        > >> > > > Hi,
        > >> > > >
        > >> > > > To determine the white balance of my setup, I took a red, green
        > and
        > >> blue
        > >> > > > image of 20LMi (a G3 star). But I am struggling to find a way to
        > >> measure
        > >> > > > the average brightness in the star. The Fits Liberator gives me
        > the
        > >> mean
        > >> > > > for the entire image, but not for a smaller area. Anybody knows a
        > >> way to
        > >> > > > get this?
        > >> > > >
        > >> > > > Thanks
        > >> > > > MarkS
        > >> > > >
        > >> > > >
        > >> > > > [Non-text portions of this message have been removed]
        > >> > > >
        > >> > >
        > >> > >
        > >> > >
        > >> >
        > >> >
        > >> > [Non-text portions of this message have been removed]
        > >> >
        > >>
        > >>
        > >>
        > >
        > >
        >
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >
        > ------------------------------------
        >
        >
        >
        >
        >


        [Non-text portions of this message have been removed]
      • Stan
        Obviously the sky background color pollution was not handled and those ratios are invalid. To calculate color/filter ratios, it is imperative to first subtract
        Message 3 of 23 , Jun 2 10:25 AM
        • 0 Attachment
          Obviously the sky background color pollution was not handled and those ratios are invalid.

          To calculate color/filter ratios, it is imperative to first subtract sky bias levels from each component.

          To manually calculate:

          For each filtered image, measure the mode or median of nearby dark sky (no stars or nebula) and then measure the avg of a tight and uniform box surrounding the calibration star (G2); subtract the background from the star and use that for the ratio calculations.

          To calculate via CCDStack:

          Create a color image, open the "Adjust Color" form (if not already open) and perform a "set background" (if not done already). Drag a tight rectangle around the calibration star and press the "balance" button (be sure the "factor" radio box is checked). The ratios are automatically calculated and displayed. To normalize ratios to a particular color – double-click the area next to the ratio display box for that color. (read Help: Concepts, Color section)

          Stan
        • Mark Striebeck
          Hi Stan, Thanks a lot for these instructions (I was just composing an email asking how to do this? :-) But why is it that sky glow affects star colors
          Message 4 of 23 , Jun 2 10:29 AM
          • 0 Attachment
            Hi Stan,

            Thanks a lot for these instructions (I was just composing an email asking
            how to do this? :-)

            But why is it that sky glow affects star colors differently then sky color?
            In my (naive) view, I thought of sky glow as a kind of filter that distorts
            the color for everything equally in an image.

            Thanks
            MarkS


            On Sun, Jun 2, 2013 at 10:25 AM, Stan <stan_ccd@...> wrote:

            > **
            >
            >
            > Obviously the sky background color pollution was not handled and those
            > ratios are invalid.
            >
            > To calculate color/filter ratios, it is imperative to first subtract sky
            > bias levels from each component.
            >
            > To manually calculate:
            >
            > For each filtered image, measure the mode or median of nearby dark sky (no
            > stars or nebula) and then measure the avg of a tight and uniform box
            > surrounding the calibration star (G2); subtract the background from the
            > star and use that for the ratio calculations.
            >
            > To calculate via CCDStack:
            >
            > Create a color image, open the "Adjust Color" form (if not already open)
            > and perform a "set background" (if not done already). Drag a tight
            > rectangle around the calibration star and press the "balance" button (be
            > sure the "factor" radio box is checked). The ratios are automatically
            > calculated and displayed. To normalize ratios to a particular color �
            > double-click the area next to the ratio display box for that color. (read
            > Help: Concepts, Color section)
            >
            > Stan
            >
            >
            >


            [Non-text portions of this message have been removed]
          • Stan
            ... Sky transparency is a filter that can vary by color. Thus it may be necessary to adjust ratios based on air mass (sky alt). But sky glow is not a filter,
            Message 5 of 23 , Jun 2 11:01 AM
            • 0 Attachment
              --- Mark Striebeck <mark.striebeck@...> wrote:
              > But why is it that sky glow affects star colors differently...
              > thought of sky glow as a kind of filter...

              Sky transparency is a filter that can vary by color. Thus it may be necessary to adjust ratios based on air mass (sky alt).

              But sky glow is not a filter, the glow does not absorb or block photons. Sky glow is an imposition that is equivalent to a double exposure of the astro objects and a colored screen. So the way to neutralize sky glow is to subtract its contribution. Messing with color ratios to "balance" sky glow will necessarily distort the colors of the astro objects. (This is why most terrestrial photo software cannot correctly deal with astro image color.)

              Stan
            • Mark Striebeck
              That makes sense - thanks! ... [Non-text portions of this message have been removed]
              Message 6 of 23 , Jun 2 11:02 AM
              • 0 Attachment
                That makes sense - thanks!


                On Sun, Jun 2, 2013 at 11:01 AM, Stan <stan_ccd@...> wrote:

                > **
                >
                >
                > --- Mark Striebeck <mark.striebeck@...> wrote:
                > > But why is it that sky glow affects star colors differently...
                > > thought of sky glow as a kind of filter...
                >
                > Sky transparency is a filter that can vary by color. Thus it may be
                > necessary to adjust ratios based on air mass (sky alt).
                >
                > But sky glow is not a filter, the glow does not absorb or block photons.
                > Sky glow is an imposition that is equivalent to a double exposure of the
                > astro objects and a colored screen. So the way to neutralize sky glow is to
                > subtract its contribution. Messing with color ratios to "balance" sky glow
                > will necessarily distort the colors of the astro objects. (This is why most
                > terrestrial photo software cannot correctly deal with astro image color.)
                >
                > Stan
                >
                >
                >


                [Non-text portions of this message have been removed]
              • Ron Wodaski
                I ll add my two cents to this. It s a topic that has been around for a long time, and there are many ways to look at it. I have my own reference points, and I
                Message 7 of 23 , Jun 2 11:39 AM
                • 0 Attachment
                  I'll add my two cents to this. It's a topic that has been around for a long time, and there are many ways to look at it. I have my own reference points, and I think they are useful ones. There's a long discussion about it in my first book with some visualizations that help show the difference; here's a short version without the illustrations.

                  I call the two different types of color problems color _bias_, and color _imbalance_.

                  Let's start with color bias. Any bias is simply an offset. It applies to voltages and other things, as well as to color levels. So if there is a bias in a color, it means that the _real_ values are offset by the same number in all cases. So if one pixel has a true value of 100, a bias of 12 means that the pixel will contain a blue brightness value of 112 instead of 100. Another pixel with a true value of 21 will contain the value 21+12, or 33.

                  To remove a blue bias, you subtract the same amount from the blue channel of every pixel. The trick, of course, is figuring out what that amount is.

                  So a bias is a uniform, unwanted signal that affects all pixels equally.

                  A color imbalance occurs when different amounts of signal are recorded for each channel. In this case, the effect on each pixel is proportional, not fixed. For example, blue brightness might be 20% more intense than the other channels. Using the same brightness values as in the previous example, the pixel with a blue brightness value of 100 would have a recorded value of 100*1.2, or 120. The increase in blue brightness for for a pixel with a blue value of 21 would be 21*1.2, or 25.2.

                  So you can't simply subtract a uniform value to correct a color imbalance, you need to adjust the percentages of each color channel to achieve balance.

                  So one key point is this: color _bias_ and color _imbalance_ require different mathematical methods to be solved. That's important because it establishes the need to address each individually. You can't properly balance color if there is a bias; you can't remove a bias by color balancing.

                  (Not explained here, but you be able to see why on your own: if there is even a very small color bias, changing the color balance will amplify that bias. So you must remove color bias first, then balance color. It's also a good idea to look at the color bias after a color balancing, just in case there was any residual you missed.)

                  There are good tools for each of these corrections. The trick is in knowing how to tell which is which. Looking at the individual color histograms is the best way to spot a color bias: the black point will be different in each channel. (That is, the rise at the left side will occur at different distances from the left margin.) The appearance of a color bias is more subtle; the actual histogram curves will have different proportions. (Note: an image with a lot of one color can mimic this, as when you image a nebula that is heavily dominate by H-alpha emissions.)

                  More to the point of your question, sky glow is 'sky color' - you can't really separate things like airglow and light pollution; they are all simply recorded during your exposure. On the other hand, once you learn to remove bias and imbalance separately using whichever tool you prefer, you will automatically correct for _all_ color issues correctly. The source is not nearly as important as making sure the right math gets applied to the right issues!

                  Ron Wodaski



                  On Jun 2, 2013, at 10:29 AM, Mark Striebeck <mark.striebeck@...> wrote:

                  > Hi Stan,
                  >
                  > Thanks a lot for these instructions (I was just composing an email asking
                  > how to do this? :-)
                  >
                  > But why is it that sky glow affects star colors differently then sky color?
                  > In my (naive) view, I thought of sky glow as a kind of filter that distorts
                  > the color for everything equally in an image.
                  >
                  > Thanks
                  > MarkS
                  >
                  >
                  > On Sun, Jun 2, 2013 at 10:25 AM, Stan <stan_ccd@...> wrote:
                  >
                  >> **
                  >>
                  >>
                  >> Obviously the sky background color pollution was not handled and those
                  >> ratios are invalid.
                  >>
                  >> To calculate color/filter ratios, it is imperative to first subtract sky
                  >> bias levels from each component.
                  >>
                  >> To manually calculate:
                  >>
                  >> For each filtered image, measure the mode or median of nearby dark sky (no
                  >> stars or nebula) and then measure the avg of a tight and uniform box
                  >> surrounding the calibration star (G2); subtract the background from the
                  >> star and use that for the ratio calculations.
                  >>
                  >> To calculate via CCDStack:
                  >>
                  >> Create a color image, open the "Adjust Color" form (if not already open)
                  >> and perform a "set background" (if not done already). Drag a tight
                  >> rectangle around the calibration star and press the "balance" button (be
                  >> sure the "factor" radio box is checked). The ratios are automatically
                  >> calculated and displayed. To normalize ratios to a particular color –
                  >> double-click the area next to the ratio display box for that color. (read
                  >> Help: Concepts, Color section)
                  >>
                  >> Stan
                  >>
                  >>
                  >>
                  >
                  >
                  > [Non-text portions of this message have been removed]
                  >
                  >
                  >
                  > ------------------------------------
                  >
                  >
                  >
                  >
                • Mark Striebeck
                  Thanks for these great explanations Stan and Ron. Let me recap (to make sure that I understand it correct). sky glow is a bias that affects different colors
                  Message 8 of 23 , Jun 2 12:27 PM
                  • 0 Attachment
                    Thanks for these great explanations Stan and Ron.

                    Let me recap (to make sure that I understand it correct).

                    sky glow is a bias that affects different colors differently, lets assume
                    it adds (10, 1, 2) in red, blue, green

                    my imaging train (mostly camera) introduces a color imbalance, let's assume
                    it's red=1, blue=1.1, green=1.2 (i.e. the green signal is 1/1.1 times
                    weaker then the red signal)

                    Now, let's assume that two pixels in my image have the original colors (50,
                    50, 50) and (100, 100, 100)

                    Because of sky glow, these pixels will be (60, 51, 52) and (110, 101, 102)
                    when they enter my scope.

                    My imaging train distorts them to (60, 46, 43) and (110, 92, 85)

                    I can't remove the bias first as there is no constant addition/subtraction
                    that would work for both pixels.

                    Which means, I have to correct the color imbalance first (either by
                    selecting different exposure times, or by selecting different weights when
                    combining the 3 colors). And after that, I can remove the bias from the sky
                    glow.

                    Did I get this right?

                    MarkS


                    On Sun, Jun 2, 2013 at 11:39 AM, Ron Wodaski <yahoo@...> wrote:

                    > I'll add my two cents to this. It's a topic that has been around for a
                    > long time, and there are many ways to look at it. I have my own reference
                    > points, and I think they are useful ones. There's a long discussion about
                    > it in my first book with some visualizations that help show the difference;
                    > here's a short version without the illustrations.
                    >
                    > I call the two different types of color problems color _bias_, and color
                    > _imbalance_.
                    >
                    > Let's start with color bias. Any bias is simply an offset. It applies to
                    > voltages and other things, as well as to color levels. So if there is a
                    > bias in a color, it means that the _real_ values are offset by the same
                    > number in all cases. So if one pixel has a true value of 100, a bias of 12
                    > means that the pixel will contain a blue brightness value of 112 instead of
                    > 100. Another pixel with a true value of 21 will contain the value 21+12, or
                    > 33.
                    >
                    > To remove a blue bias, you subtract the same amount from the blue channel
                    > of every pixel. The trick, of course, is figuring out what that amount is.
                    >
                    > So a bias is a uniform, unwanted signal that affects all pixels equally.
                    >
                    > A color imbalance occurs when different amounts of signal are recorded for
                    > each channel. In this case, the effect on each pixel is proportional, not
                    > fixed. For example, blue brightness might be 20% more intense than the
                    > other channels. Using the same brightness values as in the previous
                    > example, the pixel with a blue brightness value of 100 would have a
                    > recorded value of 100*1.2, or 120. The increase in blue brightness for for
                    > a pixel with a blue value of 21 would be 21*1.2, or 25.2.
                    >
                    > So you can't simply subtract a uniform value to correct a color imbalance,
                    > you need to adjust the percentages of each color channel to achieve balance.
                    >
                    > So one key point is this: color _bias_ and color _imbalance_ require
                    > different mathematical methods to be solved. That's important because it
                    > establishes the need to address each individually. You can't properly
                    > balance color if there is a bias; you can't remove a bias by color
                    > balancing.
                    >
                    > (Not explained here, but you be able to see why on your own: if there is
                    > even a very small color bias, changing the color balance will amplify that
                    > bias. So you must remove color bias first, then balance color. It's also a
                    > good idea to look at the color bias after a color balancing, just in case
                    > there was any residual you missed.)
                    >
                    > There are good tools for each of these corrections. The trick is in
                    > knowing how to tell which is which. Looking at the individual color
                    > histograms is the best way to spot a color bias: the black point will be
                    > different in each channel. (That is, the rise at the left side will occur
                    > at different distances from the left margin.) The appearance of a color
                    > bias is more subtle; the actual histogram curves will have different
                    > proportions. (Note: an image with a lot of one color can mimic this, as
                    > when you image a nebula that is heavily dominate by H-alpha emissions.)
                    >
                    > More to the point of your question, sky glow is 'sky color' - you can't
                    > really separate things like airglow and light pollution; they are all
                    > simply recorded during your exposure. On the other hand, once you learn to
                    > remove bias and imbalance separately using whichever tool you prefer, you
                    > will automatically correct for _all_ color issues correctly. The source is
                    > not nearly as important as making sure the right math gets applied to the
                    > right issues!
                    >
                    > Ron Wodaski
                    >
                    >
                    >
                    > On Jun 2, 2013, at 10:29 AM, Mark Striebeck <mark.striebeck@...>
                    > wrote:
                    >
                    > > Hi Stan,
                    > >
                    > > Thanks a lot for these instructions (I was just composing an email asking
                    > > how to do this? :-)
                    > >
                    > > But why is it that sky glow affects star colors differently then sky
                    > color?
                    > > In my (naive) view, I thought of sky glow as a kind of filter that
                    > distorts
                    > > the color for everything equally in an image.
                    > >
                    > > Thanks
                    > > MarkS
                    > >
                    > >
                    > > On Sun, Jun 2, 2013 at 10:25 AM, Stan <stan_ccd@...> wrote:
                    > >
                    > >> **
                    > >>
                    > >>
                    > >> Obviously the sky background color pollution was not handled and those
                    > >> ratios are invalid.
                    > >>
                    > >> To calculate color/filter ratios, it is imperative to first subtract sky
                    > >> bias levels from each component.
                    > >>
                    > >> To manually calculate:
                    > >>
                    > >> For each filtered image, measure the mode or median of nearby dark sky
                    > (no
                    > >> stars or nebula) and then measure the avg of a tight and uniform box
                    > >> surrounding the calibration star (G2); subtract the background from the
                    > >> star and use that for the ratio calculations.
                    > >>
                    > >> To calculate via CCDStack:
                    > >>
                    > >> Create a color image, open the "Adjust Color" form (if not already open)
                    > >> and perform a "set background" (if not done already). Drag a tight
                    > >> rectangle around the calibration star and press the "balance" button (be
                    > >> sure the "factor" radio box is checked). The ratios are automatically
                    > >> calculated and displayed. To normalize ratios to a particular color �
                    > >> double-click the area next to the ratio display box for that color.
                    > (read
                    > >> Help: Concepts, Color section)
                    > >>
                    > >> Stan
                    > >>
                    > >>
                    > >>
                    > >
                    > >
                    > > [Non-text portions of this message have been removed]
                    > >
                    > >
                    > >
                    > > ------------------------------------
                    > >
                    > >
                    > >
                    > >
                    >
                    >
                    >
                    > ------------------------------------
                    >
                    >
                    >
                    >
                    >


                    [Non-text portions of this message have been removed]
                  • Ron Wodaski
                    First, it doesn t matter how they were altered progressively as they went through the atmosphere and into your scope. However that all happens (and it will
                    Message 9 of 23 , Jun 2 1:22 PM
                    • 0 Attachment
                      First, it doesn't matter how they were altered progressively as they went through the atmosphere and into your scope. However that all happens (and it will vary night to night, even in the same night as various lights get turned on and off), it happens.

                      What you can do is apply corrections. You _must_ remove bias first; trying to balance biased colors is literally impossible (since you are scaling the bias).

                      (it's just like bias subtraction from darks: however the bias gets there, it has to be removed before you can scale the darks.)

                      So you must remove the color bias, so you can scale the colors relative to each other.

                      That's not just for color (or dark frames); that's how you handle a bias in any situation. Bias first (it's additive, therefore linear) and proportional (non-linear) changes second. Non-linear changes to bias create nothing but problems.

                      Ron Wodaski



                      On Jun 2, 2013, at 12:27 PM, Mark Striebeck <mark.striebeck@...> wrote:

                      > Thanks for these great explanations Stan and Ron.
                      >
                      > Let me recap (to make sure that I understand it correct).
                      >
                      > sky glow is a bias that affects different colors differently, lets assume
                      > it adds (10, 1, 2) in red, blue, green
                      >
                      > my imaging train (mostly camera) introduces a color imbalance, let's assume
                      > it's red=1, blue=1.1, green=1.2 (i.e. the green signal is 1/1.1 times
                      > weaker then the red signal)
                      >
                      > Now, let's assume that two pixels in my image have the original colors (50,
                      > 50, 50) and (100, 100, 100)
                      >
                      > Because of sky glow, these pixels will be (60, 51, 52) and (110, 101, 102)
                      > when they enter my scope.
                      >
                      > My imaging train distorts them to (60, 46, 43) and (110, 92, 85)
                      >
                      > I can't remove the bias first as there is no constant addition/subtraction
                      > that would work for both pixels.
                      >
                      > Which means, I have to correct the color imbalance first (either by
                      > selecting different exposure times, or by selecting different weights when
                      > combining the 3 colors). And after that, I can remove the bias from the sky
                      > glow.
                      >
                      > Did I get this right?
                      >
                      > MarkS
                      >
                      >
                      > On Sun, Jun 2, 2013 at 11:39 AM, Ron Wodaski <yahoo@...> wrote:
                      >
                      >> I'll add my two cents to this. It's a topic that has been around for a
                      >> long time, and there are many ways to look at it. I have my own reference
                      >> points, and I think they are useful ones. There's a long discussion about
                      >> it in my first book with some visualizations that help show the difference;
                      >> here's a short version without the illustrations.
                      >>
                      >> I call the two different types of color problems color _bias_, and color
                      >> _imbalance_.
                      >>
                      >> Let's start with color bias. Any bias is simply an offset. It applies to
                      >> voltages and other things, as well as to color levels. So if there is a
                      >> bias in a color, it means that the _real_ values are offset by the same
                      >> number in all cases. So if one pixel has a true value of 100, a bias of 12
                      >> means that the pixel will contain a blue brightness value of 112 instead of
                      >> 100. Another pixel with a true value of 21 will contain the value 21+12, or
                      >> 33.
                      >>
                      >> To remove a blue bias, you subtract the same amount from the blue channel
                      >> of every pixel. The trick, of course, is figuring out what that amount is.
                      >>
                      >> So a bias is a uniform, unwanted signal that affects all pixels equally.
                      >>
                      >> A color imbalance occurs when different amounts of signal are recorded for
                      >> each channel. In this case, the effect on each pixel is proportional, not
                      >> fixed. For example, blue brightness might be 20% more intense than the
                      >> other channels. Using the same brightness values as in the previous
                      >> example, the pixel with a blue brightness value of 100 would have a
                      >> recorded value of 100*1.2, or 120. The increase in blue brightness for for
                      >> a pixel with a blue value of 21 would be 21*1.2, or 25.2.
                      >>
                      >> So you can't simply subtract a uniform value to correct a color imbalance,
                      >> you need to adjust the percentages of each color channel to achieve balance.
                      >>
                      >> So one key point is this: color _bias_ and color _imbalance_ require
                      >> different mathematical methods to be solved. That's important because it
                      >> establishes the need to address each individually. You can't properly
                      >> balance color if there is a bias; you can't remove a bias by color
                      >> balancing.
                      >>
                      >> (Not explained here, but you be able to see why on your own: if there is
                      >> even a very small color bias, changing the color balance will amplify that
                      >> bias. So you must remove color bias first, then balance color. It's also a
                      >> good idea to look at the color bias after a color balancing, just in case
                      >> there was any residual you missed.)
                      >>
                      >> There are good tools for each of these corrections. The trick is in
                      >> knowing how to tell which is which. Looking at the individual color
                      >> histograms is the best way to spot a color bias: the black point will be
                      >> different in each channel. (That is, the rise at the left side will occur
                      >> at different distances from the left margin.) The appearance of a color
                      >> bias is more subtle; the actual histogram curves will have different
                      >> proportions. (Note: an image with a lot of one color can mimic this, as
                      >> when you image a nebula that is heavily dominate by H-alpha emissions.)
                      >>
                      >> More to the point of your question, sky glow is 'sky color' - you can't
                      >> really separate things like airglow and light pollution; they are all
                      >> simply recorded during your exposure. On the other hand, once you learn to
                      >> remove bias and imbalance separately using whichever tool you prefer, you
                      >> will automatically correct for _all_ color issues correctly. The source is
                      >> not nearly as important as making sure the right math gets applied to the
                      >> right issues!
                      >>
                      >> Ron Wodaski
                      >>
                      >>
                      >>
                      >> On Jun 2, 2013, at 10:29 AM, Mark Striebeck <mark.striebeck@...>
                      >> wrote:
                      >>
                      >>> Hi Stan,
                      >>>
                      >>> Thanks a lot for these instructions (I was just composing an email asking
                      >>> how to do this? :-)
                      >>>
                      >>> But why is it that sky glow affects star colors differently then sky
                      >> color?
                      >>> In my (naive) view, I thought of sky glow as a kind of filter that
                      >> distorts
                      >>> the color for everything equally in an image.
                      >>>
                      >>> Thanks
                      >>> MarkS
                      >>>
                      >>>
                      >>> On Sun, Jun 2, 2013 at 10:25 AM, Stan <stan_ccd@...> wrote:
                      >>>
                      >>>> **
                      >>>>
                      >>>>
                      >>>> Obviously the sky background color pollution was not handled and those
                      >>>> ratios are invalid.
                      >>>>
                      >>>> To calculate color/filter ratios, it is imperative to first subtract sky
                      >>>> bias levels from each component.
                      >>>>
                      >>>> To manually calculate:
                      >>>>
                      >>>> For each filtered image, measure the mode or median of nearby dark sky
                      >> (no
                      >>>> stars or nebula) and then measure the avg of a tight and uniform box
                      >>>> surrounding the calibration star (G2); subtract the background from the
                      >>>> star and use that for the ratio calculations.
                      >>>>
                      >>>> To calculate via CCDStack:
                      >>>>
                      >>>> Create a color image, open the "Adjust Color" form (if not already open)
                      >>>> and perform a "set background" (if not done already). Drag a tight
                      >>>> rectangle around the calibration star and press the "balance" button (be
                      >>>> sure the "factor" radio box is checked). The ratios are automatically
                      >>>> calculated and displayed. To normalize ratios to a particular color –
                      >>>> double-click the area next to the ratio display box for that color.
                      >> (read
                      >>>> Help: Concepts, Color section)
                      >>>>
                      >>>> Stan
                      >>>>
                      >>>>
                      >>>>
                      >>>
                      >>>
                      >>> [Non-text portions of this message have been removed]
                      >>>
                      >>>
                      >>>
                      >>> ------------------------------------
                      >>>
                      >>>
                      >>>
                      >>>
                      >>
                      >>
                      >>
                      >> ------------------------------------
                      >>
                      >>
                      >>
                      >>
                      >>
                      >
                      >
                      > [Non-text portions of this message have been removed]
                      >
                      >
                      >
                      > ------------------------------------
                      >
                      >
                      >
                      >
                    • Bob Franke
                      Hi Stan, Your below manual calculation is what I call poor man s photometry. This is precisely what the eXcalibrator Classic routine does. When eXcalibrator
                      Message 10 of 23 , Jun 4 9:56 AM
                      • 0 Attachment
                        Hi Stan,

                        Your below manual calculation is what I call poor man's photometry. This is precisely what the "eXcalibrator Classic" routine does. When eXcalibrator uses SExtractor, a more sophisticated true aperture photometry method provides the data. Both of these methods are repeated for each color channel using exactly the same background sample or aperture.

                        I have found the "poor man's" method to be surprisingly accurate. The original "eXcalibrator classic" routine provides RGB ratios very close to that when eXcalibrator uses SExtractor.

                        With my STF-8300 and Baader filters, I get RGB ratios of 1.0, 1.20 and 1.43. This is with pristine skies near the zenith. Mark describes poor seeing conditions for his M51 image. So I think eXcalibrator's extreme ratios are likely valid. The final result seems to agree.

                        Cheers,
                        Bob


                        --- In ccd-newastro@yahoogroups.com, "Stan" <stan_ccd@...> wrote:
                        >
                        > Obviously the sky background color pollution was not handled and those ratios are invalid.
                        >
                        > To calculate color/filter ratios, it is imperative to first subtract sky bias levels from each component.
                        >
                        > To manually calculate:
                        >
                        > For each filtered image, measure the mode or median of nearby dark sky (no stars or nebula) and then measure the avg of a tight and uniform box surrounding the calibration star (G2); subtract the background from the star and use that for the ratio calculations.
                        >
                        > To calculate via CCDStack:
                        >
                        > Create a color image, open the "Adjust Color" form (if not already open) and perform a "set background" (if not done already). Drag a tight rectangle around the calibration star and press the "balance" button (be sure the "factor" radio box is checked). The ratios are automatically calculated and displayed. To normalize ratios to a particular color – double-click the area next to the ratio display box for that color. (read Help: Concepts, Color section)
                        >
                        > Stan
                        >
                      • Bob Franke
                        Ron, how s this? After calibrating the RGB images, flatten the background for each color channel. Then apply pixel math (addition or subtraction) to all pixels
                        Message 11 of 23 , Jun 4 4:16 PM
                        • 0 Attachment
                          Ron, how's this?

                          After calibrating the RGB images, flatten the background for each color channel.

                          Then apply pixel math (addition or subtraction) to all pixels in each color channel to normalize the backgrounds. This sets the black point for each channel to the same level and effectively removes color bias.

                          Then use your favorite tool, in my case eXcalibrator, to calculate the RGB factors for color balance. Use these RGB factors to create the color image.

                          Finally, recheck the color bias. A small adjustment may be required to lineup the bottom of the three color histograms.

                          Regards,
                          Bob


                          --- In ccd-newastro@yahoogroups.com, Ron Wodaski <yahoo@...> wrote:
                          >
                          > First, it doesn't matter how they were altered progressively as they went through the atmosphere and into your scope. However that all happens (and it will vary night to night, even in the same night as various lights get turned on and off), it happens.
                          >
                          > What you can do is apply corrections. You _must_ remove bias first; trying to balance biased colors is literally impossible (since you are scaling the bias).
                          >
                          > (it's just like bias subtraction from darks: however the bias gets there, it has to be removed before you can scale the darks.)
                          >
                          > So you must remove the color bias, so you can scale the colors relative to each other.
                          >
                          > That's not just for color (or dark frames); that's how you handle a bias in any situation. Bias first (it's additive, therefore linear) and proportional (non-linear) changes second. Non-linear changes to bias create nothing but problems.
                          >
                          > Ron Wodaski
                          >
                          >
                          >
                          > On Jun 2, 2013, at 12:27 PM, Mark Striebeck <mark.striebeck@...> wrote:
                          >
                          > > Thanks for these great explanations Stan and Ron.
                          > >
                          > > Let me recap (to make sure that I understand it correct).
                          > >
                          > > sky glow is a bias that affects different colors differently, lets assume
                          > > it adds (10, 1, 2) in red, blue, green
                          > >
                          > > my imaging train (mostly camera) introduces a color imbalance, let's assume
                          > > it's red=1, blue=1.1, green=1.2 (i.e. the green signal is 1/1.1 times
                          > > weaker then the red signal)
                          > >
                          > > Now, let's assume that two pixels in my image have the original colors (50,
                          > > 50, 50) and (100, 100, 100)
                          > >
                          > > Because of sky glow, these pixels will be (60, 51, 52) and (110, 101, 102)
                          > > when they enter my scope.
                          > >
                          > > My imaging train distorts them to (60, 46, 43) and (110, 92, 85)
                          > >
                          > > I can't remove the bias first as there is no constant addition/subtraction
                          > > that would work for both pixels.
                          > >
                          > > Which means, I have to correct the color imbalance first (either by
                          > > selecting different exposure times, or by selecting different weights when
                          > > combining the 3 colors). And after that, I can remove the bias from the sky
                          > > glow.
                          > >
                          > > Did I get this right?
                          > >
                          > > MarkS
                          > >
                          > >
                          > > On Sun, Jun 2, 2013 at 11:39 AM, Ron Wodaski <yahoo@...> wrote:
                          > >
                          > >> I'll add my two cents to this. It's a topic that has been around for a
                          > >> long time, and there are many ways to look at it. I have my own reference
                          > >> points, and I think they are useful ones. There's a long discussion about
                          > >> it in my first book with some visualizations that help show the difference;
                          > >> here's a short version without the illustrations.
                          > >>
                          > >> I call the two different types of color problems color _bias_, and color
                          > >> _imbalance_.
                          > >>
                          > >> Let's start with color bias. Any bias is simply an offset. It applies to
                          > >> voltages and other things, as well as to color levels. So if there is a
                          > >> bias in a color, it means that the _real_ values are offset by the same
                          > >> number in all cases. So if one pixel has a true value of 100, a bias of 12
                          > >> means that the pixel will contain a blue brightness value of 112 instead of
                          > >> 100. Another pixel with a true value of 21 will contain the value 21+12, or
                          > >> 33.
                          > >>
                          > >> To remove a blue bias, you subtract the same amount from the blue channel
                          > >> of every pixel. The trick, of course, is figuring out what that amount is.
                          > >>
                          > >> So a bias is a uniform, unwanted signal that affects all pixels equally.
                          > >>
                          > >> A color imbalance occurs when different amounts of signal are recorded for
                          > >> each channel. In this case, the effect on each pixel is proportional, not
                          > >> fixed. For example, blue brightness might be 20% more intense than the
                          > >> other channels. Using the same brightness values as in the previous
                          > >> example, the pixel with a blue brightness value of 100 would have a
                          > >> recorded value of 100*1.2, or 120. The increase in blue brightness for for
                          > >> a pixel with a blue value of 21 would be 21*1.2, or 25.2.
                          > >>
                          > >> So you can't simply subtract a uniform value to correct a color imbalance,
                          > >> you need to adjust the percentages of each color channel to achieve balance.
                          > >>
                          > >> So one key point is this: color _bias_ and color _imbalance_ require
                          > >> different mathematical methods to be solved. That's important because it
                          > >> establishes the need to address each individually. You can't properly
                          > >> balance color if there is a bias; you can't remove a bias by color
                          > >> balancing.
                          > >>
                          > >> (Not explained here, but you be able to see why on your own: if there is
                          > >> even a very small color bias, changing the color balance will amplify that
                          > >> bias. So you must remove color bias first, then balance color. It's also a
                          > >> good idea to look at the color bias after a color balancing, just in case
                          > >> there was any residual you missed.)
                          > >>
                          > >> There are good tools for each of these corrections. The trick is in
                          > >> knowing how to tell which is which. Looking at the individual color
                          > >> histograms is the best way to spot a color bias: the black point will be
                          > >> different in each channel. (That is, the rise at the left side will occur
                          > >> at different distances from the left margin.) The appearance of a color
                          > >> bias is more subtle; the actual histogram curves will have different
                          > >> proportions. (Note: an image with a lot of one color can mimic this, as
                          > >> when you image a nebula that is heavily dominate by H-alpha emissions.)
                          > >>
                          > >> More to the point of your question, sky glow is 'sky color' - you can't
                          > >> really separate things like airglow and light pollution; they are all
                          > >> simply recorded during your exposure. On the other hand, once you learn to
                          > >> remove bias and imbalance separately using whichever tool you prefer, you
                          > >> will automatically correct for _all_ color issues correctly. The source is
                          > >> not nearly as important as making sure the right math gets applied to the
                          > >> right issues!
                          > >>
                          > >> Ron Wodaski
                          > >>
                          > >>
                          > >>
                          > >> On Jun 2, 2013, at 10:29 AM, Mark Striebeck <mark.striebeck@...>
                          > >> wrote:
                          > >>
                          > >>> Hi Stan,
                          > >>>
                          > >>> Thanks a lot for these instructions (I was just composing an email asking
                          > >>> how to do this? :-)
                          > >>>
                          > >>> But why is it that sky glow affects star colors differently then sky
                          > >> color?
                          > >>> In my (naive) view, I thought of sky glow as a kind of filter that
                          > >> distorts
                          > >>> the color for everything equally in an image.
                          > >>>
                          > >>> Thanks
                          > >>> MarkS
                          > >>>
                          > >>>
                          > >>> On Sun, Jun 2, 2013 at 10:25 AM, Stan <stan_ccd@...> wrote:
                          > >>>
                          > >>>> **
                          > >>>>
                          > >>>>
                          > >>>> Obviously the sky background color pollution was not handled and those
                          > >>>> ratios are invalid.
                          > >>>>
                          > >>>> To calculate color/filter ratios, it is imperative to first subtract sky
                          > >>>> bias levels from each component.
                          > >>>>
                          > >>>> To manually calculate:
                          > >>>>
                          > >>>> For each filtered image, measure the mode or median of nearby dark sky
                          > >> (no
                          > >>>> stars or nebula) and then measure the avg of a tight and uniform box
                          > >>>> surrounding the calibration star (G2); subtract the background from the
                          > >>>> star and use that for the ratio calculations.
                          > >>>>
                          > >>>> To calculate via CCDStack:
                          > >>>>
                          > >>>> Create a color image, open the "Adjust Color" form (if not already open)
                          > >>>> and perform a "set background" (if not done already). Drag a tight
                          > >>>> rectangle around the calibration star and press the "balance" button (be
                          > >>>> sure the "factor" radio box is checked). The ratios are automatically
                          > >>>> calculated and displayed. To normalize ratios to a particular color –
                          > >>>> double-click the area next to the ratio display box for that color.
                          > >> (read
                          > >>>> Help: Concepts, Color section)
                          > >>>>
                          > >>>> Stan
                          > >>>>
                          > >>>>
                          > >>>>
                          > >>>
                          > >>>
                          > >>> [Non-text portions of this message have been removed]
                          > >>>
                          > >>>
                          > >>>
                          > >>> ------------------------------------
                          > >>>
                          > >>>
                          > >>>
                          > >>>
                          > >>
                          > >>
                          > >>
                          > >> ------------------------------------
                          > >>
                          > >>
                          > >>
                          > >>
                          > >>
                          > >
                          > >
                          > > [Non-text portions of this message have been removed]
                          > >
                          > >
                          > >
                          > > ------------------------------------
                          > >
                          > >
                          > >
                          > >
                          >
                        • Ron Wodaski
                          I m not clear on what exactly you mean by flatten the background. It could mean different things in different programs. I m not immediately thinking of any
                          Message 12 of 23 , Jun 4 5:33 PM
                          • 0 Attachment
                            I'm not clear on what exactly you mean by "flatten the background." It could mean different things in different programs. I'm not immediately thinking of any horrors that would result from this, but my own tendency would be to correct gradients later on.

                            OTOH, they could affect other calculations, so...not inclined to push you one way or the other without seeing examples.

                            (Have not had to deal with strong gradients since I moved my imaging from Seattle area to New Mexico...so it's been a while.)

                            Ron Wodaski



                            On Jun 4, 2013, at 4:16 PM, Bob Franke <bfranke@...> wrote:

                            > Ron, how's this?
                            >
                            > After calibrating the RGB images, flatten the background for each color channel.
                            >
                            > Then apply pixel math (addition or subtraction) to all pixels in each color channel to normalize the backgrounds. This sets the black point for each channel to the same level and effectively removes color bias.
                            >
                            > Then use your favorite tool, in my case eXcalibrator, to calculate the RGB factors for color balance. Use these RGB factors to create the color image.
                            >
                            > Finally, recheck the color bias. A small adjustment may be required to lineup the bottom of the three color histograms.
                            >
                            > Regards,
                            > Bob
                            >
                            >
                            > --- In ccd-newastro@yahoogroups.com, Ron Wodaski <yahoo@...> wrote:
                            >>
                            >> First, it doesn't matter how they were altered progressively as they went through the atmosphere and into your scope. However that all happens (and it will vary night to night, even in the same night as various lights get turned on and off), it happens.
                            >>
                            >> What you can do is apply corrections. You _must_ remove bias first; trying to balance biased colors is literally impossible (since you are scaling the bias).
                            >>
                            >> (it's just like bias subtraction from darks: however the bias gets there, it has to be removed before you can scale the darks.)
                            >>
                            >> So you must remove the color bias, so you can scale the colors relative to each other.
                            >>
                            >> That's not just for color (or dark frames); that's how you handle a bias in any situation. Bias first (it's additive, therefore linear) and proportional (non-linear) changes second. Non-linear changes to bias create nothing but problems.
                            >>
                            >> Ron Wodaski
                            >>
                            >>
                            >>
                            >> On Jun 2, 2013, at 12:27 PM, Mark Striebeck <mark.striebeck@...> wrote:
                            >>
                            >>> Thanks for these great explanations Stan and Ron.
                            >>>
                            >>> Let me recap (to make sure that I understand it correct).
                            >>>
                            >>> sky glow is a bias that affects different colors differently, lets assume
                            >>> it adds (10, 1, 2) in red, blue, green
                            >>>
                            >>> my imaging train (mostly camera) introduces a color imbalance, let's assume
                            >>> it's red=1, blue=1.1, green=1.2 (i.e. the green signal is 1/1.1 times
                            >>> weaker then the red signal)
                            >>>
                            >>> Now, let's assume that two pixels in my image have the original colors (50,
                            >>> 50, 50) and (100, 100, 100)
                            >>>
                            >>> Because of sky glow, these pixels will be (60, 51, 52) and (110, 101, 102)
                            >>> when they enter my scope.
                            >>>
                            >>> My imaging train distorts them to (60, 46, 43) and (110, 92, 85)
                            >>>
                            >>> I can't remove the bias first as there is no constant addition/subtraction
                            >>> that would work for both pixels.
                            >>>
                            >>> Which means, I have to correct the color imbalance first (either by
                            >>> selecting different exposure times, or by selecting different weights when
                            >>> combining the 3 colors). And after that, I can remove the bias from the sky
                            >>> glow.
                            >>>
                            >>> Did I get this right?
                            >>>
                            >>> MarkS
                            >>>
                            >>>
                            >>> On Sun, Jun 2, 2013 at 11:39 AM, Ron Wodaski <yahoo@...> wrote:
                            >>>
                            >>>> I'll add my two cents to this. It's a topic that has been around for a
                            >>>> long time, and there are many ways to look at it. I have my own reference
                            >>>> points, and I think they are useful ones. There's a long discussion about
                            >>>> it in my first book with some visualizations that help show the difference;
                            >>>> here's a short version without the illustrations.
                            >>>>
                            >>>> I call the two different types of color problems color _bias_, and color
                            >>>> _imbalance_.
                            >>>>
                            >>>> Let's start with color bias. Any bias is simply an offset. It applies to
                            >>>> voltages and other things, as well as to color levels. So if there is a
                            >>>> bias in a color, it means that the _real_ values are offset by the same
                            >>>> number in all cases. So if one pixel has a true value of 100, a bias of 12
                            >>>> means that the pixel will contain a blue brightness value of 112 instead of
                            >>>> 100. Another pixel with a true value of 21 will contain the value 21+12, or
                            >>>> 33.
                            >>>>
                            >>>> To remove a blue bias, you subtract the same amount from the blue channel
                            >>>> of every pixel. The trick, of course, is figuring out what that amount is.
                            >>>>
                            >>>> So a bias is a uniform, unwanted signal that affects all pixels equally.
                            >>>>
                            >>>> A color imbalance occurs when different amounts of signal are recorded for
                            >>>> each channel. In this case, the effect on each pixel is proportional, not
                            >>>> fixed. For example, blue brightness might be 20% more intense than the
                            >>>> other channels. Using the same brightness values as in the previous
                            >>>> example, the pixel with a blue brightness value of 100 would have a
                            >>>> recorded value of 100*1.2, or 120. The increase in blue brightness for for
                            >>>> a pixel with a blue value of 21 would be 21*1.2, or 25.2.
                            >>>>
                            >>>> So you can't simply subtract a uniform value to correct a color imbalance,
                            >>>> you need to adjust the percentages of each color channel to achieve balance.
                            >>>>
                            >>>> So one key point is this: color _bias_ and color _imbalance_ require
                            >>>> different mathematical methods to be solved. That's important because it
                            >>>> establishes the need to address each individually. You can't properly
                            >>>> balance color if there is a bias; you can't remove a bias by color
                            >>>> balancing.
                            >>>>
                            >>>> (Not explained here, but you be able to see why on your own: if there is
                            >>>> even a very small color bias, changing the color balance will amplify that
                            >>>> bias. So you must remove color bias first, then balance color. It's also a
                            >>>> good idea to look at the color bias after a color balancing, just in case
                            >>>> there was any residual you missed.)
                            >>>>
                            >>>> There are good tools for each of these corrections. The trick is in
                            >>>> knowing how to tell which is which. Looking at the individual color
                            >>>> histograms is the best way to spot a color bias: the black point will be
                            >>>> different in each channel. (That is, the rise at the left side will occur
                            >>>> at different distances from the left margin.) The appearance of a color
                            >>>> bias is more subtle; the actual histogram curves will have different
                            >>>> proportions. (Note: an image with a lot of one color can mimic this, as
                            >>>> when you image a nebula that is heavily dominate by H-alpha emissions.)
                            >>>>
                            >>>> More to the point of your question, sky glow is 'sky color' - you can't
                            >>>> really separate things like airglow and light pollution; they are all
                            >>>> simply recorded during your exposure. On the other hand, once you learn to
                            >>>> remove bias and imbalance separately using whichever tool you prefer, you
                            >>>> will automatically correct for _all_ color issues correctly. The source is
                            >>>> not nearly as important as making sure the right math gets applied to the
                            >>>> right issues!
                            >>>>
                            >>>> Ron Wodaski
                            >>>>
                            >>>>
                            >>>>
                            >>>> On Jun 2, 2013, at 10:29 AM, Mark Striebeck <mark.striebeck@...>
                            >>>> wrote:
                            >>>>
                            >>>>> Hi Stan,
                            >>>>>
                            >>>>> Thanks a lot for these instructions (I was just composing an email asking
                            >>>>> how to do this? :-)
                            >>>>>
                            >>>>> But why is it that sky glow affects star colors differently then sky
                            >>>> color?
                            >>>>> In my (naive) view, I thought of sky glow as a kind of filter that
                            >>>> distorts
                            >>>>> the color for everything equally in an image.
                            >>>>>
                            >>>>> Thanks
                            >>>>> MarkS
                            >>>>>
                            >>>>>
                            >>>>> On Sun, Jun 2, 2013 at 10:25 AM, Stan <stan_ccd@...> wrote:
                            >>>>>
                            >>>>>> **
                            >>>>>>
                            >>>>>>
                            >>>>>> Obviously the sky background color pollution was not handled and those
                            >>>>>> ratios are invalid.
                            >>>>>>
                            >>>>>> To calculate color/filter ratios, it is imperative to first subtract sky
                            >>>>>> bias levels from each component.
                            >>>>>>
                            >>>>>> To manually calculate:
                            >>>>>>
                            >>>>>> For each filtered image, measure the mode or median of nearby dark sky
                            >>>> (no
                            >>>>>> stars or nebula) and then measure the avg of a tight and uniform box
                            >>>>>> surrounding the calibration star (G2); subtract the background from the
                            >>>>>> star and use that for the ratio calculations.
                            >>>>>>
                            >>>>>> To calculate via CCDStack:
                            >>>>>>
                            >>>>>> Create a color image, open the "Adjust Color" form (if not already open)
                            >>>>>> and perform a "set background" (if not done already). Drag a tight
                            >>>>>> rectangle around the calibration star and press the "balance" button (be
                            >>>>>> sure the "factor" radio box is checked). The ratios are automatically
                            >>>>>> calculated and displayed. To normalize ratios to a particular color –
                            >>>>>> double-click the area next to the ratio display box for that color.
                            >>>> (read
                            >>>>>> Help: Concepts, Color section)
                            >>>>>>
                            >>>>>> Stan
                            >>>>>>
                            >>>>>>
                            >>>>>>
                            >>>>>
                            >>>>>
                            >>>>> [Non-text portions of this message have been removed]
                            >>>>>
                            >>>>>
                            >>>>>
                            >>>>> ------------------------------------
                            >>>>>
                            >>>>>
                            >>>>>
                            >>>>>
                            >>>>
                            >>>>
                            >>>>
                            >>>> ------------------------------------
                            >>>>
                            >>>>
                            >>>>
                            >>>>
                            >>>>
                            >>>
                            >>>
                            >>> [Non-text portions of this message have been removed]
                            >>>
                            >>>
                            >>>
                            >>> ------------------------------------
                            >>>
                            >>>
                            >>>
                            >>>
                            >>
                            >
                            >
                            >
                            >
                            > ------------------------------------
                            >
                            >
                            >
                            >
                          • Bob Franke
                            Me too Ron. The gradients are greatly reduced since I left Seattle, specifically the Magnolia neighborhood. By removing gradients or flattening the images
                            Message 13 of 23 , Jun 4 7:01 PM
                            • 0 Attachment
                              Me too Ron. The gradients are greatly reduced since I left Seattle, specifically the Magnolia neighborhood.

                              By removing gradients or flattening the images up-front, I feel that a small sampled background area will be more accurate for the rest of the image. This should be better for color bias removal.

                              Cheers,
                              Bob


                              --- In ccd-newastro@yahoogroups.com, Ron Wodaski <yahoo@...> wrote:
                              >
                              > I'm not clear on what exactly you mean by "flatten the background." It could mean different things in different programs. I'm not immediately thinking of any horrors that would result from this, but my own tendency would be to correct gradients later on.
                              >
                              > OTOH, they could affect other calculations, so...not inclined to push you one way or the other without seeing examples.
                              >
                              > (Have not had to deal with strong gradients since I moved my imaging from Seattle area to New Mexico...so it's been a while.)
                              >
                              > Ron Wodaski
                              >
                              >
                              >
                              > On Jun 4, 2013, at 4:16 PM, Bob Franke <bfranke@...> wrote:
                              >
                              > > Ron, how's this?
                              > >
                              > > After calibrating the RGB images, flatten the background for each color channel.
                              > >
                              > > Then apply pixel math (addition or subtraction) to all pixels in each color channel to normalize the backgrounds. This sets the black point for each channel to the same level and effectively removes color bias.
                              > >
                              > > Then use your favorite tool, in my case eXcalibrator, to calculate the RGB factors for color balance. Use these RGB factors to create the color image.
                              > >
                              > > Finally, recheck the color bias. A small adjustment may be required to lineup the bottom of the three color histograms.
                              > >
                              > > Regards,
                              > > Bob
                              > >
                              > >
                              > > --- In ccd-newastro@yahoogroups.com, Ron Wodaski <yahoo@> wrote:
                              > >>
                              > >> First, it doesn't matter how they were altered progressively as they went through the atmosphere and into your scope. However that all happens (and it will vary night to night, even in the same night as various lights get turned on and off), it happens.
                              > >>
                              > >> What you can do is apply corrections. You _must_ remove bias first; trying to balance biased colors is literally impossible (since you are scaling the bias).
                              > >>
                              > >> (it's just like bias subtraction from darks: however the bias gets there, it has to be removed before you can scale the darks.)
                              > >>
                              > >> So you must remove the color bias, so you can scale the colors relative to each other.
                              > >>
                              > >> That's not just for color (or dark frames); that's how you handle a bias in any situation. Bias first (it's additive, therefore linear) and proportional (non-linear) changes second. Non-linear changes to bias create nothing but problems.
                              > >>
                              > >> Ron Wodaski
                              > >>
                              > >>
                              > >>
                              > >> On Jun 2, 2013, at 12:27 PM, Mark Striebeck <mark.striebeck@> wrote:
                              > >>
                              > >>> Thanks for these great explanations Stan and Ron.
                              > >>>
                              > >>> Let me recap (to make sure that I understand it correct).
                              > >>>
                              > >>> sky glow is a bias that affects different colors differently, lets assume
                              > >>> it adds (10, 1, 2) in red, blue, green
                              > >>>
                              > >>> my imaging train (mostly camera) introduces a color imbalance, let's assume
                              > >>> it's red=1, blue=1.1, green=1.2 (i.e. the green signal is 1/1.1 times
                              > >>> weaker then the red signal)
                              > >>>
                              > >>> Now, let's assume that two pixels in my image have the original colors (50,
                              > >>> 50, 50) and (100, 100, 100)
                              > >>>
                              > >>> Because of sky glow, these pixels will be (60, 51, 52) and (110, 101, 102)
                              > >>> when they enter my scope.
                              > >>>
                              > >>> My imaging train distorts them to (60, 46, 43) and (110, 92, 85)
                              > >>>
                              > >>> I can't remove the bias first as there is no constant addition/subtraction
                              > >>> that would work for both pixels.
                              > >>>
                              > >>> Which means, I have to correct the color imbalance first (either by
                              > >>> selecting different exposure times, or by selecting different weights when
                              > >>> combining the 3 colors). And after that, I can remove the bias from the sky
                              > >>> glow.
                              > >>>
                              > >>> Did I get this right?
                              > >>>
                              > >>> MarkS
                              > >>>
                              > >>>
                              > >>> On Sun, Jun 2, 2013 at 11:39 AM, Ron Wodaski <yahoo@> wrote:
                              > >>>
                              > >>>> I'll add my two cents to this. It's a topic that has been around for a
                              > >>>> long time, and there are many ways to look at it. I have my own reference
                              > >>>> points, and I think they are useful ones. There's a long discussion about
                              > >>>> it in my first book with some visualizations that help show the difference;
                              > >>>> here's a short version without the illustrations.
                              > >>>>
                              > >>>> I call the two different types of color problems color _bias_, and color
                              > >>>> _imbalance_.
                              > >>>>
                              > >>>> Let's start with color bias. Any bias is simply an offset. It applies to
                              > >>>> voltages and other things, as well as to color levels. So if there is a
                              > >>>> bias in a color, it means that the _real_ values are offset by the same
                              > >>>> number in all cases. So if one pixel has a true value of 100, a bias of 12
                              > >>>> means that the pixel will contain a blue brightness value of 112 instead of
                              > >>>> 100. Another pixel with a true value of 21 will contain the value 21+12, or
                              > >>>> 33.
                              > >>>>
                              > >>>> To remove a blue bias, you subtract the same amount from the blue channel
                              > >>>> of every pixel. The trick, of course, is figuring out what that amount is.
                              > >>>>
                              > >>>> So a bias is a uniform, unwanted signal that affects all pixels equally.
                              > >>>>
                              > >>>> A color imbalance occurs when different amounts of signal are recorded for
                              > >>>> each channel. In this case, the effect on each pixel is proportional, not
                              > >>>> fixed. For example, blue brightness might be 20% more intense than the
                              > >>>> other channels. Using the same brightness values as in the previous
                              > >>>> example, the pixel with a blue brightness value of 100 would have a
                              > >>>> recorded value of 100*1.2, or 120. The increase in blue brightness for for
                              > >>>> a pixel with a blue value of 21 would be 21*1.2, or 25.2.
                              > >>>>
                              > >>>> So you can't simply subtract a uniform value to correct a color imbalance,
                              > >>>> you need to adjust the percentages of each color channel to achieve balance.
                              > >>>>
                              > >>>> So one key point is this: color _bias_ and color _imbalance_ require
                              > >>>> different mathematical methods to be solved. That's important because it
                              > >>>> establishes the need to address each individually. You can't properly
                              > >>>> balance color if there is a bias; you can't remove a bias by color
                              > >>>> balancing.
                              > >>>>
                              > >>>> (Not explained here, but you be able to see why on your own: if there is
                              > >>>> even a very small color bias, changing the color balance will amplify that
                              > >>>> bias. So you must remove color bias first, then balance color. It's also a
                              > >>>> good idea to look at the color bias after a color balancing, just in case
                              > >>>> there was any residual you missed.)
                              > >>>>
                              > >>>> There are good tools for each of these corrections. The trick is in
                              > >>>> knowing how to tell which is which. Looking at the individual color
                              > >>>> histograms is the best way to spot a color bias: the black point will be
                              > >>>> different in each channel. (That is, the rise at the left side will occur
                              > >>>> at different distances from the left margin.) The appearance of a color
                              > >>>> bias is more subtle; the actual histogram curves will have different
                              > >>>> proportions. (Note: an image with a lot of one color can mimic this, as
                              > >>>> when you image a nebula that is heavily dominate by H-alpha emissions.)
                              > >>>>
                              > >>>> More to the point of your question, sky glow is 'sky color' - you can't
                              > >>>> really separate things like airglow and light pollution; they are all
                              > >>>> simply recorded during your exposure. On the other hand, once you learn to
                              > >>>> remove bias and imbalance separately using whichever tool you prefer, you
                              > >>>> will automatically correct for _all_ color issues correctly. The source is
                              > >>>> not nearly as important as making sure the right math gets applied to the
                              > >>>> right issues!
                              > >>>>
                              > >>>> Ron Wodaski
                              > >>>>
                              > >>>>
                              > >>>>
                              > >>>> On Jun 2, 2013, at 10:29 AM, Mark Striebeck <mark.striebeck@>
                              > >>>> wrote:
                              > >>>>
                              > >>>>> Hi Stan,
                              > >>>>>
                              > >>>>> Thanks a lot for these instructions (I was just composing an email asking
                              > >>>>> how to do this? :-)
                              > >>>>>
                              > >>>>> But why is it that sky glow affects star colors differently then sky
                              > >>>> color?
                              > >>>>> In my (naive) view, I thought of sky glow as a kind of filter that
                              > >>>> distorts
                              > >>>>> the color for everything equally in an image.
                              > >>>>>
                              > >>>>> Thanks
                              > >>>>> MarkS
                              > >>>>>
                              > >>>>>
                              > >>>>> On Sun, Jun 2, 2013 at 10:25 AM, Stan <stan_ccd@> wrote:
                              > >>>>>
                              > >>>>>> **
                              > >>>>>>
                              > >>>>>>
                              > >>>>>> Obviously the sky background color pollution was not handled and those
                              > >>>>>> ratios are invalid.
                              > >>>>>>
                              > >>>>>> To calculate color/filter ratios, it is imperative to first subtract sky
                              > >>>>>> bias levels from each component.
                              > >>>>>>
                              > >>>>>> To manually calculate:
                              > >>>>>>
                              > >>>>>> For each filtered image, measure the mode or median of nearby dark sky
                              > >>>> (no
                              > >>>>>> stars or nebula) and then measure the avg of a tight and uniform box
                              > >>>>>> surrounding the calibration star (G2); subtract the background from the
                              > >>>>>> star and use that for the ratio calculations.
                              > >>>>>>
                              > >>>>>> To calculate via CCDStack:
                              > >>>>>>
                              > >>>>>> Create a color image, open the "Adjust Color" form (if not already open)
                              > >>>>>> and perform a "set background" (if not done already). Drag a tight
                              > >>>>>> rectangle around the calibration star and press the "balance" button (be
                              > >>>>>> sure the "factor" radio box is checked). The ratios are automatically
                              > >>>>>> calculated and displayed. To normalize ratios to a particular color –
                              > >>>>>> double-click the area next to the ratio display box for that color.
                              > >>>> (read
                              > >>>>>> Help: Concepts, Color section)
                              > >>>>>>
                              > >>>>>> Stan
                              > >>>>>>
                              > >>>>>>
                              > >>>>>>
                              > >>>>>
                              > >>>>>
                              > >>>>> [Non-text portions of this message have been removed]
                              > >>>>>
                              > >>>>>
                              > >>>>>
                              > >>>>> ------------------------------------
                              > >>>>>
                              > >>>>>
                              > >>>>>
                              > >>>>>
                              > >>>>
                              > >>>>
                              > >>>>
                              > >>>> ------------------------------------
                              > >>>>
                              > >>>>
                              > >>>>
                              > >>>>
                              > >>>>
                              > >>>
                              > >>>
                              > >>> [Non-text portions of this message have been removed]
                              > >>>
                              > >>>
                              > >>>
                              > >>> ------------------------------------
                              > >>>
                              > >>>
                              > >>>
                              > >>>
                              > >>
                              > >
                              > >
                              > >
                              > >
                              > > ------------------------------------
                              > >
                              > >
                              > >
                              > >
                              >
                            Your message has been successfully submitted and would be delivered to recipients shortly.