Author Topic: New Module: StarGenerator (Mac OS X + Full Source Code)  (Read 17586 times)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Hi all,

I am glad to announce that a new PixInsight module is now available for all Mac OS X users: StarGenerator.

StarGenerator is a tool for generation of synthetic star fields. It retrieves positional and magnitude data from a large star database and generates a rendition according to a set of user-specified parameters: equatorial coordinates of the center of the field, focal length, pixel size, sensor size, limiting magnitude, and star FWHM. StarGenerator images are strictly linear, but the tool can optionally apply an automatic, nonlinear stretch to facilitate image manipulation and inspection.

Examples

Here are several examples of pretty synthetic images produced with StarGenerator:

Ursa Major constellation to 11th magnitude:
http://forum-images.pixinsight.com/legacy/SG/UMa.jpg

M45 region to 16th magnitude approx.:
http://forum-images.pixinsight.com/legacy/SG/M45.jpg

Crux constellation to 12th magnitude:
http://forum-images.pixinsight.com/legacy/SG/Cru.jpg

I have also uploaded the corresponding TIFF files:
http://forum-images.pixinsight.com/legacy/SG/UMa.tif
http://forum-images.pixinsight.com/legacy/SG/M45.tif
http://forum-images.pixinsight.com/legacy/SG/Cru.tif

StarGenerator produces 32-bit integer images. This is because a large dynamic range is necessary to render faint stars linearly. For example, approximately 109 discrete pixel values are required to render a 16th magnitude star in a linear space spanning to magnitude -1.5 (Sirius). Note that this largely exceeds the range of 32-bit floating point.

Purpose

The main purpose of this tool is to generate synthetic reference images for mosaic construction. With these reference images, one can build complex mosaics of any practical size, with the help of the DynamicAlignment and StarAlignment image registration tools in PixInsight.

I have written StarGenerator specifically for mosaic construction with the four detectors of the LAICA CCD array used at the prime focus of the 3.5-meter telescope of Calar Alto Observatory, in southern Spain. With this instrument, LAICA can produce 256-megapixel mosaics covering one square degree. Due to the extremely small superposition between LAICA frames, and also to the large-field distortion of the 3.5-meter telescope, these mosaics cannot be built accurately by registering the images. The only practical way to build them is by adapting the four frames to a reference image with a sufficient number of stars, using DynamicAlignment (StarAlignment cannot be used in this case, due to strong field distortion).

Star Data

This initial version of StarGenerator uses the PPMX astrometric catalog. This catalog includes 18,088,919 stars and is complete up to magnitude 12.8. All the information and original source data is available at the CDS:

http://cdsarc.u-strasbg.fr/cgi-bin/Cat?I/312

Projection Systems

StarGenerator uses three projection systems:

- Polar Stereographic projection for high declinations.
- Lambert Conformal Conic projection for intermediate declinations.
- Mercator Cylindrical projection for nearly equatorial declinations.

The projection system is selected automatically as a function of the coordinates of the center of the field. Note that the three projections are conformal, i.e. they preserve angles. In general, if you generate a wide field rendition of the sky (say above 15 or 20 degrees of FOV, for example), don't expect StarAlignment to work properly due to strong distortions, which are inherent to any system that projects large portions of a sphere on the plane.

Positional accuracy of StarGenerator renditions is only limited by the accuracy of star database positions (0.01 arcseconds) and by geometric resolution, which depends on the size of the generated image and the dimensions of the field of view, i.e. on focal length and pixel size parameters.

Availability

For now the StarGenerator module is only available for Mac OS X, but I hope that, since I have made the entire source code publicly available (under GPLv3 license, see below), it will be compiled on Linux and Windows very soon. Anyway, of course StarGenerator will be available for all supported PixInsight platforms in September.

Source Code

StarGenerator has been released under an open-source license: GPL version 3. This means that the entire source code of this module is publicly available, and it can be used under the terms of the GPL v3:

http://pixinsight.com/export/StarGenerator/StarGenerator-osx-src-1.0.0.38-20090818.zip

For now the code is largely undocumented, but this will change soon. Please feel free to contribute and participate in the development of this tool. A first contribution could be compiling the module for Windows and Linux. This should be very easy for active PixInsight developers ;)

Short-Term Improvements

This is a brief to-do list, sorted by priority:

- Parallelization of the star generation routine, to use all available processor cores.
- Use of a denser star catalog. USNO A2 is a firm candidate.
- Implementation of additional projection systems, for example area-preserving projections.

Installation

To install StarGenerator you have to download two files: the star database (generated from PPMX data), and the module binary file. The star database is necessarily a pretty large file: 242 MB. Download it to any folder under your home folder on your Mac (for example, to your Downloads folder):

http://pixinsight.com/export/StarGenerator/PPMX.bin

Then download the module binary file:

http://pixinsight.com/export/StarGenerator/StarGenerator-osx-x86-1.0.0.38-20090818.zip

To install this file, please follow these steps:

1. Exit PixInsight, if you have it running.

2. Double-click the zip archive to uncompress it. You'll get the module file:

  StarGenerator-pxm.dylib

3. Right-click the PixInsight.app application. It is on the /Applications folder if you copied it to that folder, as usual.

4. From the context menu, select Show Package Contents.

5. Now a Finder window opens for the PixInsight.app folder. Expand the Contents/MacOS/bin folder.

6. Copy the module file (step 2) to PixInsight.app/Contents/MacOS/bin

7. Run PixInsight.

8. From the main menu, select Process > Modules > Install Modules.

9. On the Install Modules dialog, click the Search button. A new module should be found, which should be the StarGenerator-pxm.dylib file that you copied in step 6. Now click the Install button and you are done.

Yep, I know I must implement a better/easier way to install modules on the Mac. It is in the to-do list, indeed :)


Enjoy!
« Last Edit: 2009 August 19 03:40:04 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
Re: New Module: StarGenerator (Mac OS X + Full Source Code)
« Reply #1 on: 2009 August 19 00:38:17 »
Juan,

A clever solution to a difficult problem.

Now its very tempting to just replace all my distorted stars with these nice generated ones.  >:D

Cheers
         Simon

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: New Module: StarGenerator (Mac OS X + Full Source Code)
« Reply #2 on: 2009 August 20 07:08:06 »
Hi Juan,

This seems to be a promising new module - however two questions immediately come to mind.

First, I thought you were supposed to be on holiday? I think the time has now come for us, your loyal followers, to contact your lonely family and explain that, this time, we didn't ASK you to do this great work for us  ;)

Second, surely the natural development for this module is to not only generate the stars in the field of view, but for your module to also generate all the nebulosity and shadows as well. This would solve many problems that struggling imagers like myself are having  :angel:

I could also then sell off my telescope, pay off my mortgage, and retire early !!

Who needs Photoshop anyway  ;D

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
Re: New Module: StarGenerator (Mac OS X + Full Source Code)
« Reply #3 on: 2009 August 20 07:11:50 »
Niall,

This must be a Scottish thing....I was thinking exactly the same myself! No more freezing nights  >:D

Cheers
         Simon

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: New Module: StarGenerator (Mac OS X + Full Source Code)
« Reply #4 on: 2009 August 20 14:29:22 »
Hi all,

as Juan said, he developed this tool kindly for my new images with LAICA camera. It's impossible to make a good mosaic due to the barrel distorsion of the huge field. I show you the first attempt at assembling 3 of the 16 panel of the whole image I'm processing right now, of NGC7000...

This is the field of the three panels with the PPMX stars:



These are the three panels over the PPMX star map:



When making the mosaic it's mandatory to overlay each consecutive panel over the star map, so you can do a precise alignment of the adjacent panels with faint stars. This is very critical as I work at 0.226"/pixel.

Here's the final assembled panel at 900 pixel wide resolution:



And here a link to a 50% resolution image:

http://forum-images.pixinsight.com/legacy/SG/Mosaic4_proc.jpg

The exposures are 3x6min in H-alpha. It has a mild processing: HDRWT and curves.


Best regards,
Vicent.

Offline Jack Harvey

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 975
    • PegasusAstronomy.com & Starshadows.com
Re: New Module: StarGenerator (Mac OS X + Full Source Code)
« Reply #5 on: 2009 August 20 14:56:36 »
Impressive and innovative for sure
Jack Harvey, PTeam Member
Team Leader, SSRO/PROMPT Imaging Team, CTIO

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: New Module: StarGenerator (Mac OS X + Full Source Code)
« Reply #6 on: 2009 November 24 01:55:46 »
What's wrong?  :-[


The Log:
StarGenerator: Global context

Lambert Conformal Conic Projection
Projection center ....... ?=61.23333 ?=+37.10139
Field of view ........... H=1.93402 V=1.93402
Right ascension range ... ?E=60.00522 ?W=62.46145
Declination range ....... ?S=+36.12828 ?N=+38.06840

Searching stars...
1779 stars found
Applying proper motions, epoch = 2455155.0: 100%
Star FWHM: 10.00 arcsec, 2.941 px
Rendering stars: 100%
1068 stars in projection
2.375 s

StarAlignment: Processing view: NGC1499_0000_006Hacalib
stars:
Structure map: 100%
Detecting stars: 100%
992 stars found.
NGC1499_0000_006Hacalib:
Structure map: 100%
Detecting stars: 100%
1092 stars found.
Matching stars...
264 putative star pair matches.
Performing RANSAC...
*** RANSAC: Failed to find a valid set of star pair matches.
* Previous attempt failed - this is try #2
useScaleDifferences=false
275 putative star pair matches.
Performing RANSAC...
*** RANSAC: Failed to find a valid set of star pair matches.
.
.
.
* Reference image: Limiting to 15 brightest stars.
* Target image: Limiting to 15 brightest stars.
11 putative star pair matches.
Performing RANSAC...
*** RANSAC: Failed to find a valid set of star pair matches.
*** Error: Unable to find an initial set of putative star pair matches
<* failed *>

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: New Module: StarGenerator (Mac OS X + Full Source Code)
« Reply #7 on: 2009 November 24 08:21:22 »
Hi Nikolay,

I'd need to take a look at this image to see what happens. Apparently there is no reason for StarAlignment to refuse building this mosaic. In fact, I've just made a quick test with your screenshot (by cropping both images), and after tweaking parameters (required because the images are tiny in the screenshot), I've been able to register them without problems. Maybe you've found a bug here.

Could you upload this image, so I can reproduce your exact steps?

Thanks.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: New Module: StarGenerator (Mac OS X + Full Source Code)
« Reply #8 on: 2009 November 24 18:06:37 »
Could you upload this image, so I can reproduce your exact steps?
Juan, it's NGC1499 for mosaic. You have it. See the name of file.

Offline Andrei

  • Newcomer
  • Posts: 2
Re: New Module: StarGenerator (Mac OS X + Full Source Code)
« Reply #9 on: 2015 April 12 10:29:54 »
Hello!
Dear Juan, PPMX catalog file is not available at this address:
http://pixinsight.com/export/StarGenerator/PPMX.bin

Where it is possible to download it now?
Thank you in advance!

Andrei

Offline Andrei

  • Newcomer
  • Posts: 2
Re: New Module: StarGenerator (Mac OS X + Full Source Code)
« Reply #10 on: 2015 April 12 11:27:15 »
Ups, found it here:
http://pixinsight.com/download/#StarGenerator_Databases

Sorry, for troubling!
Maybe for someone this link will be useful  )