Author Topic: How do I cut and paste stars?  (Read 7404 times)

Offline Earl_UK

  • Newcomer
  • Posts: 20
How do I cut and paste stars?
« on: 2014 December 31 10:46:57 »
I have a rosette image which I have done a star removal, got the background looking good and now want to put them back but cant for the life of me work out how to do this any ideas?

With Stars



Without Stars



Thanks in advance.

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: How do I cut and paste stars?
« Reply #1 on: 2014 December 31 11:42:53 »
Earl

Here is the quick and dirty basic method. Ideally your images would have the same registration. Your posted images are not so the final position of the stars are not the correct location.

Anyway here we go. Make a star mask from your original image. Apply the mask to your image without the stars. In PixelMath use the name of your original image and apply PixelMath to your image without stars. You've now copied the stars from your first image to the without stars image.

Here is what the steps looked like. The last image is the without stars image clone so you can see before and after.

This should help understand a basic method.



Mike

Offline marekc

  • PixInsight Addict
  • ***
  • Posts: 177
Re: How do I cut and paste stars?
« Reply #2 on: 2014 December 31 14:20:07 »
Hi Earl,

I think you did a great job of getting the stars out in the first place! (Heck, stars can be so difficult to deal with that I find myself admiring your `nebula-only' image purely for it's own sake!)

I'd love to see how you did removed the stars - or did you follow a tutorial that's already been published?

- Marek

Offline Earl_UK

  • Newcomer
  • Posts: 20
Re: How do I cut and paste stars?
« Reply #3 on: 2014 December 31 14:41:11 »
Thanks for the tips,

Using star masks and Morpholgocal ransformation in lots of small steps doe a good job or removing stars, you need to make a new mask and tweak with the settings a touch too.

this is where I have got to, not perfect as I have some artifacts around stars in the darke areas and the detail in the nebulosity has gone a bit but it will do for now.


Offline Warhen

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 490
    • Billions and Billions
Re: How do I cut and paste stars?
« Reply #4 on: 2015 January 07 09:45:50 »
I may have something cool to try. Get Gerald's new 'Blend' Utilities script
http://www.werbeagentur.org/oldwexi/Daten/Blend_StarMask_english.js
I believe the registered images if stretched the same, with stars on top and Lighten blend mode may do the trick. Let me know!
Best always, Warren

Warren A. Keller
www.ip4ap.com

Offline llpastro

  • PixInsight Addict
  • ***
  • Posts: 199
    • Sonoran Dark Skies
Re: How do I cut and paste stars?
« Reply #5 on: 2015 January 08 06:43:38 »
Not being knowledgeable in scripting, would someone be so kind to tell me how to take the script Warren is referencing and installing it in PixInsight?

Larry
AP 140 Refractor
SBIG ST-10XME
AP Mach 1 Mount
ATS Portable Pier
Tucson, Arizona

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Re: How do I cut and paste stars?
« Reply #6 on: 2015 January 08 08:12:19 »
Larry,

Here are my steps for adding a new script, though I welcome others to comment on better ways:

•   Save the process zip file and then unzip to it to a location you will remember (such a creating a subfolder to hold PI scripts)
•   Go into PixInsight and right click anywhere in the empty workspace
•   Choose "load process icon" and navigate to the file
•   A process icon should appear
•   Just drag n drop that on your image
•   Double click on the icon to see the PixelMath window with formulae etc.
   
To put the process in your Process Container, open both the PixelMath window as above and your Process Container.  Then simply drag the triangle at the bottom left of the PixelMath box into the Process Container.  Once you have it there you can name it by clicking on the bottom right button re change description.  Note this is how you would load any PixelMath formula into the Process Container so you have them all handy

Hope that helps,

Jim
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse

Offline llpastro

  • PixInsight Addict
  • ***
  • Posts: 199
    • Sonoran Dark Skies
Re: How do I cut and paste stars?
« Reply #7 on: 2015 January 08 10:55:28 »
The script in question appears to be only a text file.

Larry
AP 140 Refractor
SBIG ST-10XME
AP Mach 1 Mount
ATS Portable Pier
Tucson, Arizona

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Re: How do I cut and paste stars?
« Reply #8 on: 2015 January 09 07:24:47 »
Larry,

You are right, its a javascript.  Ok, save the same as I mentioned above and remember where you put it.  Then, go to the scripts tab along the top and click.  I am not able to access the PI work screen at the moment, but near the bottom, about three or four options up, just below a dividing line, is an option to execute script (though the words may be slightly different).  Click on that and then navigate to where you saved the script.  Just click on the javascript icon in that folder and the tool should open right up.

Hope that helps,

Best,

Jim
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse

Offline Don

  • Newcomer
  • Posts: 47
Re: How do I cut and paste stars?
« Reply #9 on: 2015 January 09 15:21:08 »
I may have something cool to try. Get Gerald's new 'Blend' Utilities script
http://www.werbeagentur.org/oldwexi/Daten/Blend_StarMask_english.js
I believe the registered images if stretched the same, with stars on top and Lighten blend mode may do the trick. Let me know!

I can tell you that the Blend script worked quite well for me in adding stars through a star mask.  Thanks for suggesting it, and thanks to Gerald for creating it.  Actually I found it necessary to put the comet image on top (IMG2 in the script dialog).

I have struggled with comet images recently due to the difficulty of getting the stars in without artifacts, and this worked better than anything I have tried.  The attached image is 39 one minute exposures at ISO 1600 with a Canon T2i.  I should also thank the very cold weather we had last night here in the southeast US for keeping the noise level low.

I also made an animation from the 39 individual frames that you can see at this URL if you're interested:

dandjreed.homedns.org/Lovejoy_Animation.gif

Don

Offline llpastro

  • PixInsight Addict
  • ***
  • Posts: 199
    • Sonoran Dark Skies
Re: How do I cut and paste stars?
« Reply #10 on: 2015 January 10 07:35:05 »
Thanks Jim, I finally got it.

Larry
AP 140 Refractor
SBIG ST-10XME
AP Mach 1 Mount
ATS Portable Pier
Tucson, Arizona

Offline lensman57

  • Newcomer
  • Posts: 13
Re: How do I cut and paste stars?
« Reply #11 on: 2015 January 11 07:41:20 »
Thanks Jim, I finally got it.

Larry

Hi Larry,

I maybe a bitlate with my input but the way that I add the scripts is to first save it to a folder ( scripts for example ) then in PI go scripts, Feature scripts and a dialog opens click add and navigate to the folder and click the select folder, the script is then found, click ok and then click regenerate and the new script should now be under the scripts menu in the PI tool bar. The above script appears as " Blend " in my menu. This maybe a  little more easy than going thru execute script command.

A.G

Offline orion58

  • Newcomer
  • Posts: 1
Re: How do I cut and paste stars?
« Reply #12 on: 2015 January 14 16:31:23 »
Hi Larry,

I maybe a bitlate with my input but the way that I add the scripts is to first save it to a folder ( scripts for example ) then in PI go scripts, Feature scripts and a dialog opens click add and navigate to the folder and click the select folder, the script is then found, click ok and then click regenerate and the new script should now be under the scripts menu in the PI tool bar. The above script appears as " Blend " in my menu. This maybe a  little more easy than going thru execute script command.

A.G

Thanks for this info A.G.  Worked perfectly for me.