create account

Basic astrophotography image processing with PixInsight - Part 3 by astrophoto.kevin

View this thread on: hive.blogpeakd.comecency.com
· @astrophoto.kevin ·
$37.26
Basic astrophotography image processing with PixInsight - Part 3
In the first two parts, we have learned about the bias and the dark frames. Both of them are used to reduce the noise in the image. In this part, we will talk about flat frames, what they are used for and of course how they will be stacked to a master flat.


 
## Flat frames

Like bias and dark frames, flat frames are also calibration frames, but instead of reducing noise the flat frames are used to reduce optical disturbances. Every setup will create some visual disturbances in the image, some more, the other less. These disturbances can be dust on the sensor, on any other glass surface or the vignette of the optic. But in every case, it will have effects on the quality of the images. The picture below is an extremely stretched master flat to bring out all the all the details. You see clearly two spots which are caused due to dust on the cover glass of the sensor, and you see the vignetting of the telescope in the corners. The lower right corner also has a shading due to the filter holder.

[![flat_rgb.jpg](https://cdn.steemitimages.com/DQmXvwyLhU5NhmKHRKSCj2JTNBvAwkX9Hjo58GxGA8TddwM/flat_rgb.jpg)](https://cdn.steemitimages.com/DQmXvwyLhU5NhmKHRKSCj2JTNBvAwkX9Hjo58GxGA8TddwM/flat_rgb.jpg)



Flat frames are a little bit tricky. You need an evenly bright surface that is in front of your optic. I use an old notebook display with some layers of opaque foil. You can also use a white T-shirt and illuminate it with a torch. Make sure, that your camera is still at the same angle, so you have not rotated it yet, and the focuser is in the same position as for the light frames. In the recording settings, make sure that you use the same ISO. The automatic mode of your DSLR can do the other parameters. If you want to make them manually or if you have no automatic mode, like on an astrocamera, then you have to look that the peak of the histogram. This peak should be between in the left third and the middle of the histogram. It should not go to the edges, whether left or right.

![flat_histogram.png](https://cdn.steemitimages.com/DQmUkEYYi8BfVJaH1ncE1M4oWouMjmvmDuokpoHUnpPcWHv/flat_histogram.png)

This is a screenshot of the histogram from [SequenceGeneratorPro](http://mainsequencesoftware.com/); the flat is exposed correctly. The peaks are between the left third and the middle. As I am capturing with a color camera, the three peaks represent the colors red, green and blue.


 
## How do flat frames effect in the final image

To show you how the usage of flat frames will effect on the final image I have made to different images, one with and one without flat frames. I have put them together in one picture to show the difference. Both images had just an auto stretch without any further editing.

[![mit-flat_ohne-flat.jpg](https://cdn.steemitimages.com/DQmdYhvHDqxZtmnphgLVATBeh6EAn1XDwXbEichCqM819Yy/mit-flat_ohne-flat.jpg)](https://cdn.steemitimages.com/DQmdYhvHDqxZtmnphgLVATBeh6EAn1XDwXbEichCqM819Yy/mit-flat_ohne-flat.jpg)

You will see that the dust spots disappear in the image with flat frames. Also, the background is smoother; you will see this especially in the left corner at the bottom. In the image without flat calibration, this area is much darker. When you take a look at the flat frame above again, you will see how it matches.


 
## Master flat

As for all other types of images, we do in astrophotography, we also need to make a master for the flat frames. The simple reason for this is that it will reduce the noise. If your light source is bright enough we only need a short exposure time, so we can make a lot of flat frames without investing much time. My flats have an exposure time of 0.27 seconds. I think you should also be below one second, even if your light source isn’t very bright. As for the bias frames, the more flat frames you make, the better will be the result. I took 100 pieces for this project.

To practice the stacking, we now do our master flat and go through to the process of stacking again.

At first, we need to calibrate our flat frames with our master bias that we had created in the [first part](https://steemit.com/steemstem/@astrophoto.kevin/basic-astrophotography-image-processing-with-pixinsight-part-1) of this series. For this step we are using the ImageCalibration process (PROCESS -> ImageCalibration -> ImageCalibration).

We now add all our flat frames by clicking “Add Files”.

[![ImageCal_add.jpg](https://cdn.steemitimages.com/DQmTHmRKsVfUtuo8z6Ush9eWg87QZoNG3QNx1ydoAnHhWje/ImageCal_add.jpg)](https://cdn.steemitimages.com/DQmTHmRKsVfUtuo8z6Ush9eWg87QZoNG3QNx1ydoAnHhWje/ImageCal_add.jpg)

If you have added, all your flat frames go to the “Output Files” tab. Here we need to set the path were the calibrated images will be stored. I made a folder called “calibrated” in the folder were my flats are. To choose the folder click the small folder icon on the right side.

[![ImageCal_out.jpg](https://cdn.steemitimages.com/DQmc5AF8rTpAseqcPsgUpu2awVGSjYxFxKmcDGJYT7AiNx5/ImageCal_out.jpg)](https://cdn.steemitimages.com/DQmc5AF8rTpAseqcPsgUpu2awVGSjYxFxKmcDGJYT7AiNx5/ImageCal_out.jpg)

As we need to only calibrate with the master bias, we have to uncheck everything except “Master Bias”. Choose your master bias file by clicking on the small folder icon.

[![ImageCal_bias.jpg](https://cdn.steemitimages.com/DQmSNVCMicPKRYJmZ7NWDVM7hQriY1M9Sep862oqTvumjda/ImageCal_bias.jpg)](https://cdn.steemitimages.com/DQmSNVCMicPKRYJmZ7NWDVM7hQriY1M9Sep862oqTvumjda/ImageCal_bias.jpg)

Once everything is set up, click the small circle (Apply Global) at the bottom of the ImageCalibration window, this will start the process.

[![ImageCal_finish.jpg](https://cdn.steemitimages.com/DQmfMtK8C4NB8W43koJ8QFJmW1cWGK15bfM4EyDWWeFbLGa/ImageCal_finish.jpg)](https://cdn.steemitimages.com/DQmfMtK8C4NB8W43koJ8QFJmW1cWGK15bfM4EyDWWeFbLGa/ImageCal_finish.jpg)

When the process has finished, we want to stack our newly generated calibrated flat frames. Open the ImageIntegration process (PROCESS -> ImageIntegration -> ImageIntegration) and add all of your calibrated flat frames by clicking “Add Files”.

[![ImageInt_add.jpg](https://cdn.steemitimages.com/DQmWhXxojkrmMM7G6Q2FmJXddtSd7se3m8nZRXtGFwtYZ4H/ImageInt_add.jpg)](https://cdn.steemitimages.com/DQmWhXxojkrmMM7G6Q2FmJXddtSd7se3m8nZRXtGFwtYZ4H/ImageInt_add.jpg)

If you have added, all your calibrated flat frames go to the “Image Integration” tab. Here we have to make some settings. The settings here are the same as for the bias frames.

- Combination: Average
- Normalization: Multiplicative
- Weights: Don't care (all weights = 1)
- Check "Generate integrated image"
- Check "Evaluate noise"

[![ImageInt_int.jpg](https://cdn.steemitimages.com/DQmW34aBarmb5k5nGZxNELFkPgBWkcuRLy6fyhPhBBjH6hK/ImageInt_int.jpg)](https://cdn.steemitimages.com/DQmW34aBarmb5k5nGZxNELFkPgBWkcuRLy6fyhPhBBjH6hK/ImageInt_int.jpg)

If you have set up everything like in the screenshot, go to the “Pixel Rejection (1)” tab. Here we use the following settings.

- Rejection algorithm: Percentile Clipping
- Normalization: Equalize fluxes
- Check "Generate rejection maps"
- Check "Clip low pixels"
- Check "Clip high pixels"

[![ImageInt_Rej1.jpg](https://cdn.steemitimages.com/DQmabsJ9NWQUj3Zi384FfiKrLSzHEiN5trQVJqziFB4DU8p/ImageInt_Rej1.jpg)](https://cdn.steemitimages.com/DQmabsJ9NWQUj3Zi384FfiKrLSzHEiN5trQVJqziFB4DU8p/ImageInt_Rej1.jpg)

Have you everything set up? Then we go to the “Pixel Rejection (2)” tab. Here we will leave the default settings, which will work in the most cases.

[![ImageInt_Rej2.jpg](https://cdn.steemitimages.com/DQmcVpUfJFjNp78FdnA1mNNmM29rzk4xbNSNntKZfa2o5CT/ImageInt_Rej2.jpg)](https://cdn.steemitimages.com/DQmcVpUfJFjNp78FdnA1mNNmM29rzk4xbNSNntKZfa2o5CT/ImageInt_Rej2.jpg)

Once everything is set up and done, we click the small circle (Apply Global) at the bottom of the ImageIntegration window, this will start the stacking process. 

After the process has finished, three new images will appear. The image that is interesting for us is the one that is called “integration”. The other two images will contain the rejected information. Use the auto stretch with the ScreenTransferFunktion to see the data in the images.

[![ImageInt_finish.jpg](https://cdn.steemitimages.com/DQmWKpbAULz1jC2WFzuXsoEMbMMajQkmTUJbVxtJ5zXeYau/ImageInt_finish.jpg)](https://cdn.steemitimages.com/DQmWKpbAULz1jC2WFzuXsoEMbMMajQkmTUJbVxtJ5zXeYau/ImageInt_finish.jpg)

After we have inspected the images and we think that everything is ok, we safe the “integration” image as “Masterflat”. Make sure you use the PixInsight file format “.xisf”.


 
## Conclusion

We have now made all of the calibration frames that we need to optimize our images. This means that we will start to make the final image in the next parts. So we will leave the black, grey and noisy calibration frames behind us and we will go to straight ahead to a pretty and colorful image.

------

**Thank you very much for visiting and reading!**
I hope that this has been a useful article for you. If you have any questions or suggestions, please don't be afraid to let me know of anything you thought about this post!

Yours, 
[@astrophoto.kevin](https://steemit.com/@astrophoto.kevin)
 

------

 
All images, otherwise clearly indicated, in this post are my own work.
You can use it for free if you credit them to [@astrophoto.kevin](https://steemit.com/@astrophoto.kevin)

 
 

![dmbwP4E.png](https://cdn.steemitimages.com/DQmT95DJLfEgZXVJiCyWNDZQvYCHBEWGYLrkR9ze7yerrbR/dmbwP4E.png)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 124 others
properties (23)
authorastrophoto.kevin
permlinkbasic-astrophotography-image-processing-with-pixinsight-part-3
categorysteemstem
json_metadata{"tags":["steemstem","astronomy","tutorial","photography","fotofeed"],"image":["https://cdn.steemitimages.com/DQmXvwyLhU5NhmKHRKSCj2JTNBvAwkX9Hjo58GxGA8TddwM/flat_rgb.jpg","https://cdn.steemitimages.com/DQmUkEYYi8BfVJaH1ncE1M4oWouMjmvmDuokpoHUnpPcWHv/flat_histogram.png","https://cdn.steemitimages.com/DQmdYhvHDqxZtmnphgLVATBeh6EAn1XDwXbEichCqM819Yy/mit-flat_ohne-flat.jpg","https://cdn.steemitimages.com/DQmTHmRKsVfUtuo8z6Ush9eWg87QZoNG3QNx1ydoAnHhWje/ImageCal_add.jpg","https://cdn.steemitimages.com/DQmc5AF8rTpAseqcPsgUpu2awVGSjYxFxKmcDGJYT7AiNx5/ImageCal_out.jpg","https://cdn.steemitimages.com/DQmSNVCMicPKRYJmZ7NWDVM7hQriY1M9Sep862oqTvumjda/ImageCal_bias.jpg","https://cdn.steemitimages.com/DQmfMtK8C4NB8W43koJ8QFJmW1cWGK15bfM4EyDWWeFbLGa/ImageCal_finish.jpg","https://cdn.steemitimages.com/DQmWhXxojkrmMM7G6Q2FmJXddtSd7se3m8nZRXtGFwtYZ4H/ImageInt_add.jpg","https://cdn.steemitimages.com/DQmW34aBarmb5k5nGZxNELFkPgBWkcuRLy6fyhPhBBjH6hK/ImageInt_int.jpg","https://cdn.steemitimages.com/DQmabsJ9NWQUj3Zi384FfiKrLSzHEiN5trQVJqziFB4DU8p/ImageInt_Rej1.jpg","https://cdn.steemitimages.com/DQmcVpUfJFjNp78FdnA1mNNmM29rzk4xbNSNntKZfa2o5CT/ImageInt_Rej2.jpg","https://cdn.steemitimages.com/DQmWKpbAULz1jC2WFzuXsoEMbMMajQkmTUJbVxtJ5zXeYau/ImageInt_finish.jpg","https://cdn.steemitimages.com/DQmT95DJLfEgZXVJiCyWNDZQvYCHBEWGYLrkR9ze7yerrbR/dmbwP4E.png"],"links":["https://cdn.steemitimages.com/DQmXvwyLhU5NhmKHRKSCj2JTNBvAwkX9Hjo58GxGA8TddwM/flat_rgb.jpg","http://mainsequencesoftware.com/","https://cdn.steemitimages.com/DQmdYhvHDqxZtmnphgLVATBeh6EAn1XDwXbEichCqM819Yy/mit-flat_ohne-flat.jpg","https://steemit.com/steemstem/@astrophoto.kevin/basic-astrophotography-image-processing-with-pixinsight-part-1","https://cdn.steemitimages.com/DQmTHmRKsVfUtuo8z6Ush9eWg87QZoNG3QNx1ydoAnHhWje/ImageCal_add.jpg","https://cdn.steemitimages.com/DQmc5AF8rTpAseqcPsgUpu2awVGSjYxFxKmcDGJYT7AiNx5/ImageCal_out.jpg","https://cdn.steemitimages.com/DQmSNVCMicPKRYJmZ7NWDVM7hQriY1M9Sep862oqTvumjda/ImageCal_bias.jpg","https://cdn.steemitimages.com/DQmfMtK8C4NB8W43koJ8QFJmW1cWGK15bfM4EyDWWeFbLGa/ImageCal_finish.jpg","https://cdn.steemitimages.com/DQmWhXxojkrmMM7G6Q2FmJXddtSd7se3m8nZRXtGFwtYZ4H/ImageInt_add.jpg","https://cdn.steemitimages.com/DQmW34aBarmb5k5nGZxNELFkPgBWkcuRLy6fyhPhBBjH6hK/ImageInt_int.jpg","https://cdn.steemitimages.com/DQmabsJ9NWQUj3Zi384FfiKrLSzHEiN5trQVJqziFB4DU8p/ImageInt_Rej1.jpg","https://cdn.steemitimages.com/DQmcVpUfJFjNp78FdnA1mNNmM29rzk4xbNSNntKZfa2o5CT/ImageInt_Rej2.jpg","https://cdn.steemitimages.com/DQmWKpbAULz1jC2WFzuXsoEMbMMajQkmTUJbVxtJ5zXeYau/ImageInt_finish.jpg","https://steemit.com/@astrophoto.kevin"],"app":"steemit/0.1","format":"markdown"}
created2018-06-11 09:44:30
last_update2018-06-11 09:44:30
depth0
children8
last_payout2018-06-18 09:44:30
cashout_time1969-12-31 23:59:59
total_payout_value28.298 HBD
curator_payout_value8.962 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length9,529
author_reputation86,277,108,443,159
root_title"Basic astrophotography image processing with PixInsight - Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,269,593
net_rshares14,197,378,070,678
author_curate_reward""
vote details (188)
@a-0-1 ·
Go here https://steemit.com/@a-a-a to get your post resteemed to over 72,000 followers.
properties (22)
authora-0-1
permlinkre-astrophotokevin-basic-astrophotography-image-processing-with-pixinsight-part-3-20180611t094455434z
categorysteemstem
json_metadata{"tags":["steemstem"],"links":["https://steemit.com/@a-a-a"],"app":"steemit/0.1"}
created2018-06-11 09:44:54
last_update2018-06-11 09:44:54
depth1
children0
last_payout2018-06-18 09:44:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length87
author_reputation-1,593,356,047,755
root_title"Basic astrophotography image processing with PixInsight - Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,269,642
net_rshares0
@photonenblende ·
$0.03
Very good series Kevin!
👍  
properties (23)
authorphotonenblende
permlinkre-astrophotokevin-basic-astrophotography-image-processing-with-pixinsight-part-3-20180611t162914901z
categorysteemstem
json_metadata{"tags":["steemstem"],"community":"steempeak","app":"steempeak"}
created2018-06-11 16:29:18
last_update2018-06-11 16:29:18
depth1
children1
last_payout2018-06-18 16:29:18
cashout_time1969-12-31 23:59:59
total_payout_value0.022 HBD
curator_payout_value0.006 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length23
author_reputation374,387,969,360
root_title"Basic astrophotography image processing with PixInsight - Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,320,079
net_rshares11,441,035,178
author_curate_reward""
vote details (1)
@astrophoto.kevin ·
Thank you very much David 😊
properties (22)
authorastrophoto.kevin
permlinkre-photonenblende-re-astrophotokevin-basic-astrophotography-image-processing-with-pixinsight-part-3-20180611t174626973z
categorysteemstem
json_metadata{"tags":["steemstem"],"app":"steemit/0.1"}
created2018-06-11 17:46:27
last_update2018-06-11 17:46:27
depth2
children0
last_payout2018-06-18 17:46:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length27
author_reputation86,277,108,443,159
root_title"Basic astrophotography image processing with PixInsight - Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,329,849
net_rshares0
@terrylovejoy · (edited)
$0.42
Good Kevin! Can you do your flat calibration prior to converting to color in Pixinsight?
👍  ,
properties (23)
authorterrylovejoy
permlinkre-astrophotokevin-basic-astrophotography-image-processing-with-pixinsight-part-3-20180611t095500517z
categorysteemstem
json_metadata{"tags":["steemstem"],"app":"steemit/0.1"}
created2018-06-11 09:55:03
last_update2018-06-11 09:57:06
depth1
children3
last_payout2018-06-18 09:55:03
cashout_time1969-12-31 23:59:59
total_payout_value0.319 HBD
curator_payout_value0.104 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length88
author_reputation15,797,973,031,321
root_title"Basic astrophotography image processing with PixInsight - Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,270,768
net_rshares162,128,333,926
author_curate_reward""
vote details (2)
@astrophoto.kevin ·
$0.43
Thanks Terry 😊
In PixInsight all calibrations are done before debayering, so they are correcting the pure RAW files.
👍  ,
properties (23)
authorastrophoto.kevin
permlinkre-terrylovejoy-re-astrophotokevin-basic-astrophotography-image-processing-with-pixinsight-part-3-20180611t102914188z
categorysteemstem
json_metadata{"tags":["steemstem"],"app":"steemit/0.1"}
created2018-06-11 10:29:15
last_update2018-06-11 10:29:15
depth2
children2
last_payout2018-06-18 10:29:15
cashout_time1969-12-31 23:59:59
total_payout_value0.323 HBD
curator_payout_value0.105 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length116
author_reputation86,277,108,443,159
root_title"Basic astrophotography image processing with PixInsight - Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,274,413
net_rshares163,419,839,737
author_curate_reward""
vote details (2)
@terrylovejoy ·
$0.03
I assumed it would. 

This is always the recommended way of doing the calibration because 1) you need to ensure the images are converted the same way to color (otherwise calibration mightn't work) 2). it's a lot kinder on the computer with file sizes 1/3 the size.
👍  
properties (23)
authorterrylovejoy
permlinkre-astrophotokevin-re-terrylovejoy-re-astrophotokevin-basic-astrophotography-image-processing-with-pixinsight-part-3-20180612t030602466z
categorysteemstem
json_metadata{"tags":["steemstem"],"app":"steemit/0.1"}
created2018-06-12 03:06:03
last_update2018-06-12 03:06:03
depth3
children1
last_payout2018-06-19 03:06:03
cashout_time1969-12-31 23:59:59
total_payout_value0.022 HBD
curator_payout_value0.006 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length264
author_reputation15,797,973,031,321
root_title"Basic astrophotography image processing with PixInsight - Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,386,187
net_rshares11,640,524,399
author_curate_reward""
vote details (1)
@utopian-io ·
$0.03
#### Hi @astrophoto.kevin!

Your post was upvoted by utopian.io in cooperation with steemstem - supporting knowledge, innovation and technological advancement on the Steem Blockchain.

#### Contribute to Open Source with utopian.io
Learn how to contribute on <a href="https://join.utopian.io">our website</a> and join the new open source economy.

**Want to chat? Join the Utopian Community on Discord https://discord.gg/h52nFrV**
👍  
properties (23)
authorutopian-io
permlink20180612t195646020z
categorysteemstem
json_metadata{"tags":["utopian.tip"],"app":"utopian-io"}
created2018-06-12 19:56:45
last_update2018-06-12 19:56:45
depth1
children0
last_payout2018-06-19 19:56:45
cashout_time1969-12-31 23:59:59
total_payout_value0.023 HBD
curator_payout_value0.006 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length430
author_reputation152,955,367,999,756
root_title"Basic astrophotography image processing with PixInsight - Part 3"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,490,111
net_rshares12,332,156,706
author_curate_reward""
vote details (1)