2011-10-22

Astrometry Release


It's right time for an another development snapshot of Munipack. I have no time and no strength to stay in intense developing during our semester period. Before two months of stagnation, I issuing a rolling progress of Munipack.



General notes

The issue is still experimental. The debugging is switched on by default. Don't be confused from a lot of mash prints.


Many improvements in image loading, image manipulation or safe thread handling leads to more usable and stable application.

Also many improvements in GUI has been done. The most important is remove of left panel (selector of HDU) in Viewer and adding of zoom and coordinates panel. The image zoom is probably more important than the selector. The toolbar buttons must be relative small because users can prefers no labels to ones.

Practically all main features are (at least partially) currently developed, I plan to publish new issues more frequently.


Astrometry


The current issue is focused on astrometry. I developed a GUI and improved importantly astrometry methods. Also support for Virtual Observatory has been included:
  • New matching algorithm on base of back-tracking has been developed.
  • Dialog GUI for astrometry. Users can directly change parameters and see results of the modifications.
  • Added (unfinished) GUI dialog for aperture photometry and object detection.
  • First steps toward to direct editing of FITS files has been implemented as a support of saving WCS to HDU.
There are three modes of operation:
  • Manual specification of set of full parameters.
  • Fitting of predefined of set of parameters.
  • Matching against to a known catalogue.
Planed features:
  • astrometry directly derived from an image (transfer from image) by fitting of two images by hand (?)
  • add object name resolver (coordinates position by name)
  • using of WCS-library for support of more projections and more precise algorithms
  • solve relative coordinates calibration for wide-field images by digital camera, or precise relative (mutual) positioning of images

Virtual observatory support

This issue is a first which supports VO. Just only cone search and simple analysis of VOtable is implemented. Because there is a poor support of VO in C/C++, I created a parser of VOtable on the top of the wxWidgets interface to Expat library.

Plans:
  • object name resolving
  • image, spectra and time series (?) search implementation

Munipack's FITS files

There are two important changes in FITS files representations. The color format of FITS has been changed during this developing period. The format is more clearer now (see colorfits specification).

Additionally, I rewrote all older subroutines to store all output information as photometry and object position as FITS tables. The tables are added as a additional HDU of processed images. The advantages are:
  • less chaos, additional information are partially hidden for user
  • the information are directly accessible for processing
  • due to binary representation, there are no formatting complications for very small or huge numbers
Generally speaking, the FITS files are more suitable for code to code data transfer than complicated set of text files.


Binary packages

Binary packages are created for deb and rpm based distributions now. Older binary packages has been abandoned due (mainly) to dependency hell and on base of an user feedback.

The packages are created for main current distributions. A deb is designed for latest Ubuntu and Mint and rpm for Fedora and openSUSE. The packages are relative universal (just only widely used libraries (libc, libgtk) in latest versions are required. The choice satisfy over 70% users. Any latest widely-spread distribution does not contain wxWidgets in unstable branch flavor needed by Munipack.


Configuration files

All configuration files has been moved to ~/.xmunipack/. Additional changes are planed.

The place is not in conformance with Free desktop recommendations, but there is no support for the rules in wxWidgets.


wxWidgets update

Munipack is using the unstable branch of wxWidgets now. It is absolutely necessary because stable branch does not supports event handling for console applications. That means that CLI cannot correctly run and work with external processes.

Minor advantages of use of unstable branch are: spins supporting of double values, more flexible event handling (using of Bind), thread safe (really working!) logging functions.

Also the external process handling and pipe-lining has been rewrote (practically from scratch). The real pipe-lining like a shell is supported via chain of external processes which interacts with next and previous ones via captured standard input and output processed by its overwritten class methods. Noteworthy, the running of external process (or pipe-lining and so on) is implemented extremely poorly probably by all toolkits or under other platforms.

*

Munipack has been tagged on version 0.5.2 during Oct 19, 2011.

2011-06-07

New Format of Color FITS for RAWTRAN, FITSPNG and Munipack

Long-term experiences with processing of color FITSes has leaded me to drastic change of color-storing format. The separation of single-color bands to FITS image extension is really wrong way. It is less natural than storing in multi-dimensional single array. The data are logically grouped together with meta (header) information.

However, main reason for the change has been simplifying of manipulations with color images. The simplifying is really drastic. I removed hundredth of code lines and a lot of (potentially) buggy code.

Another important change is replacement of COLORTYP to CSPACE describing of colorspace of stored color image. I suppose, the new keyword is more mnemonics. See also description of the exact structure Color FITS format.

The changes are included since versions 0.3.0 of rawtran and fitsng and 0.5.2 of Munipack.

2011-03-15

Photon rain statistics

Following discussion with Mr. Pavel concerned on likelihood analysis of Fermi's data (see also the general description of likelihood analysis) and a creation of an illustration for Practicum, I created a toy model demonstration of capture of photons by event-counting area detectors. The key property of a fictions detector is to collect photons during unique time-samples by increasing pixel value in a random place. We can metaphorically designate the model as a photon raining detector.

More precisely, the algorithm can be represented as (sources: ccdnoise.tar.gz):
  1. start
  2. generate random X coordinate
  3. generate random Y coordinate
  4. add +1 to pixel on X,Y
  5. back to 0.
(All, that's all).

The probability of capture of an event in the time period is given by Poisson distribution

p_k (fT) = (fT)^k e^(fT) / k!
  • the p_k is probability of capturing of k-photons during time period T when averaged flux is f photons per time unit
  • the events are statistically independent (photons doesn't interacts)
  • consequence is that the zero, one, or more photons can be captured in a single pixel during T
Final results has been displayed in following animations. Both show imaginary detector on the left and empirical distribution - histogram (number of detections in a given level) of photons.



The first animation shows state shortly after start of raining. We can see:
  • the noise in start is relative huge, noise disappear with time
  • the mean gray goes from black to (light-)gray
  • the distribution histogram is highly non-symmetrical shortly after start
  • mean of the distribution increases proportionally to time
  • the distribution metamorphosing from Poisson to Gaussian


Second animation shows status on a long-term scale:
  • the noise is strongly reduced, practically disappear with time
  • the noise is not visible at end of simulation (uniform color)
  • the width of distribution increases with time,
  • but relative uncertainty decreases as sqrt(t)/t suppressing noise
  • distribution histogram approaching Gaussian, very nice illustration of the law of large numbers
Note that imaging has been set to show increasing mean during first animation and reducing relative noise during second animation.



Along with the animations, I computed mean and standard deviation of rain. The results are in graph. The standard deviation is perfectly fitted by square root. One is excellent demonstration of the important property of Poisson distribution.

2011-03-04

Barnard star constantly in motion

Just next short update to those posts Barnard in time and Continuous motion of Barnard's star.


Animation of proper motion of Barnard star.


Track of Barnard star since 2001.