Author Topic: Linear Fit question  (Read 3014 times)

Offline flinthill

  • Newcomer
  • Posts: 5
Linear Fit question
« on: 2016 June 03 11:15:52 »
I am completely new to PI and am working my way through the various processes for the first time.  Things were going well from the pre-processing stages up to Linear Fit.  Now, when I try to run LF it throws an error "Incompatible image geometry: Red_Master_DBE".  I don't know what is causing the error, whether is some setting I have overlooked or an error in one of the previous processes. 

Prior to running the Linear Fit process I ran the LRGB monochrome images through the Registration, Dynamic Crop, Gradient Removal processes and all seemed to complete successfully.  I am following the Light Vortex tutorials.


Any suggestions on how to get this newbie moving forward again would be greatly appreciated.

Ronald

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Linear Fit question
« Reply #1 on: 2016 June 03 11:42:16 »
it's possible that the crop step messed things up. did you apply exactly the same crop to each image (by saving a process icon and applying it to all the images?)

for linear fit to work right, the images have to be "the same" meaning, exactly the same X by Y dimensions and registered to one another.

rob

p.s. i don't know why so many tutorials emphasize linear fit. to me the only reason to do LF would be to normalize narrowband data for pixelmath combinations, or to get the intensities of mono RGB images to be similar so that a DBE on a merged RGB image is easier to do. once you do background neutralization and color calibration on a merged RGB image, the fact that you had previously done a linear fit to the channels is irrelevant.

Offline flinthill

  • Newcomer
  • Posts: 5
Re: Linear Fit question
« Reply #2 on: 2016 June 03 13:07:30 »
pfile, thanks for your reply.

It sure seems possible, even likely,  that the Dynamic Crop process could be the cause of the Incompatible Image Geometry error.  When I ran that process I saved the settings to a DC process icon and placed it out of the way on the workspace.  I did rename it but somehow that might have corrupted its code.  I saved each cropped image file before moving on to the Gradient Removal process.  So I had relatively "fresh" files for  the Linear Fit process.  I can't think of any other possibility...it is so early on in the processing there is not much else that could have gone wrong.

I'm glad to hear that the LF process is not totally critical to the final  image because I am also processing, in parallel to the LRGB images, an Ha image that I had planned to combine at a later state.  On a side note that probably is not related:  I had some problems calibrating the Ha image and had to use a third party utility in combination with the PI calibration masters, but that seemed to work out OK, however, I still have to figure out that hiccup.

Best,

Ronald

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Linear Fit question
« Reply #3 on: 2016 June 03 13:48:20 »
well you can check each of the images to see what their x/y dimensions are. when you bring a window to the foreground, the toolbar at the bottom should show the dimensions (w:xxxx h:yyyy). you can look at each of the images you are trying to linear fit and see which one differs.

if the 3 cropped files don't have the same dimensions, then when you try to merge them the stars most likely will not line up, so it's worth trying to figure out what's going on.

rob

Offline flinthill

  • Newcomer
  • Posts: 5
Re: Linear Fit question
« Reply #4 on: 2016 June 03 14:31:27 »
Rob,
You are right.  The RGB images are 3236X2384 and the Lum is 3326X2504 and I was using the Lum for the "Reference" image so no wonder PI found an error.  I suspect that I did not properly apply the process icon to the Lum image (which is why it is larger in both directions).  I'll go back and run the Dynamic crop on all the images and try it again.

Thanks so much for you help.  These are the little hints that are so valuable to a newbie like myself (not new to astrophotography but very new to PI).

Best,

Ronald

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Linear Fit question
« Reply #5 on: 2016 June 03 16:15:10 »
you're welcome!

interesting - in theory the L and R/G/B image should have all had the same size to start with, since they should all have had the same registration reference. i was thinking that maybe if they happened to be different to begin with, then the results of the dynamic crop might differ.

i usually save the crop until the end when i've got an RGB image, but i can see the appeal - if you have a bunch of low SNR areas at the borders or black areas, you might want to get rid of them before DBE.

rob

Offline flinthill

  • Newcomer
  • Posts: 5
Re: Linear Fit question
« Reply #6 on: 2016 June 03 17:13:05 »
Rob,
I checked back through all the original calibration and  LRGB/Ha images and all are the exact same dimension so it is clear that I failed to apply the DC process to the Lum image.  I hope to rerun the DC, Grad Rem and Linear Fit processes tonight or tomorrow morning.  That will tell us what went wrong.

It is interesting that you wait until after combining the RGB to run the DC process but I can see how the image would have more definition at that stage and there would be less of a chance for any mis-registration between the images.  Does that mean your workflow is Register>Gradient Removal>Linear Fit>RBG Combine & Lum apply>Dynamic Crop? 

The reason I cropped all of the images (LRGB/Ha) early on was to ensure all were properly sized prior to combining, especially the Ha, so there wouldn't be any registration issues when it is finally combined.  And, that brings me to a pending question I have about when is the best time to combine the Ha with the LRGB.  No doubt this is a topic for a new thread or a private exchange.

Best,

Ronald

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Linear Fit question
« Reply #7 on: 2016 June 04 12:03:25 »
well, i think as long as the images started out registered to one another and the exact same crop was applied to all images, the chance of misregistration is essentially 0.

i don't usually crop until later on in the pipeline because it's essentially a cosmetic operation for me - my pointing night to night is pretty dead on due to platesolving, so any ragged edges are caused only by dithering... which is just a few pixels worth of junk.

there are lots of thread about mixing Ha - search for "Vicent peris method" - harry's astro shed has a video tutorial and in fact i believe the NBRGBCombination script implements his procedure with a GUI.

rob

Offline flinthill

  • Newcomer
  • Posts: 5
Re: Linear Fit question
« Reply #8 on: 2016 June 04 14:08:49 »
Rob
I reprocessed starting with the Reg, Dynamic Crop, Linear Fit and then combined with Pixel Math and this time everything went smoothly.  I did have some mis-registration with the red master but re-registering the masters fix that problem.

What I have read about PI presenting a steep learning curve was no exaggeration but the end product seems to be of high quality. 

Again I appreciate your assistance and have a great weekend.

Best

Ronald