Magyar menüt kérek. Show menu in Hungarian

Tag: programming

Some of my projects

(I write in English for convenience)

  • OpenBabel.Erdély, a Romanian-Hungarian Dictionary, useful for Hungarians living in Romania. It incorporates general usage words, institution names and expressions specific to public life, locality names and toponyms in general. I recommend the web gui csillagtura.ro/obe. Details on this page. OBE is also available as integrated into an editor, the obe-wordpad.

    I consider maintaining this dictionary a duty towards my community.

  • DSO browser - has a database of more than 200k deep sky objects, able to show their realtime apparent position on the sky from the location of the observer, and estimates imageability based on altitude, overall brightness, surface brightness, distance from the Sun and from the Moon etc. csillagtura.ro/dso uses the obe frontend, so it can be invoked from it using the :dso search argument, like NGC 7000 :dso, but the night mode /dso is the interface I recommend. I use the DSO integrated into csillagtura's wordpress to aid me with writing articles. It also has an object marking utility, which I will expose later.

  • Aladin to Photo Planner - it builds on the Aladin Lite API and visualization and on DSO to help plan astrophotos.

  • Polaris - for polar alignment
    In amateur astronomy a short but very important task is to correctly polar align the telescope's mount. My Polaris "app" is a visual aid to do just that.

  • StarHeal - in astrophotography
    A program to handle dense star fields on astrophotographs, sometimes I call it starheal but doesn't really have a name.

  • the putzolo
    A userscript to tweek facebook's interface.


See my github.

The Soapbox MountPusher Guider

the interface on top of an image acquired with the guiding solution

I have the following problem at home: the balcony is small, the tube is big and I am lazy. This sums up to a constant problem of drifting, the planet or lunar surface being imaged slowly walks away. Though there are methods to polar align a mount even when there is no way to see the north pole, the small balcony part means frequent small bumps into the whole thing. The oversized scope is also prone to accidents. I also tried the feature tracker in Sharpcap, failed, and the autoguiding of PHD2, failed. So I came up with the soapbox ensembleI call it noszogtató in Hungarian, for it means something like nagger-pusher-convincer. It got itself a soapbox, literally.

Contents

  • rationale
  • block diagram
  • communication
  • desktop app
  • arduino code
  • hardware
  • conclusions, photos

(tovább…)

facebooktwittergoogle_plusredditpinterestlinkedinmail

Jupiter, Saturn, 2019-06-08

The setup is the usual, ASI 224MC, TSO ADC, N250/1200, HEQ5 with the home made motorized focuser and the home made arduino noszogtató mount guider. I would like to call this the soapbox project — it is mounted inside a soap box, though in Hungarian and Romanian we use soapbox to denote compact and dumb cameras too.

 

2019.06.07. Jupiter 2019-06-07-2144 7 pipp g3 ap1 reg1 szep

2019.06.07. Jupiter 2019-06-07-2144 7 pipp g3 ap1 reg1 szep

2019.06.07. Jupiter 2019-06-07-2226 5 pipp g3 ap1 reg1

2019.06.07. Jupiter 2019-06-07-2226 5 pipp g3 ap1 reg1

2019.06.07. Jupiter 2019-06-07-2326 8 pipp g3 ap1 reg1 szep

2019.06.07. Jupiter 2019-06-07-2326 8 pipp g3 ap1 reg1 szep

2019.06.07. szaturnusz 2019-06-07-2352 1 pipp g3 ap6 Drizzle15 p5

2019.06.07. szaturnusz 2019-06-07-2352 1 pipp g3 ap6 Drizzle15 p5

(tovább…)

facebooktwittergoogle_plusredditpinterestlinkedinmail

Safe php acos, astronomy

I’m posting because of a very frustrating issue I stumbled upon while developing my photo planner: php’s acos function has an undocumented (yet found by others) behavior. It can return NaN, in a way that breaks a JSON. The PHP manual says (2019-04-02) Return Values: The arc cosine of arg in radians — and nothing about a NaN scenario. Nothing. On forums, it can be found that the function returns NaN when the argument is out of the range [-1, 1]. And as it turns out, due to rounding errors in the float, this can happen. Very, very, very annoying.

I have the following lines of code, obviously for astronomy, calculating the arc distance, in degrees, from radec pairs, in degrees.

function arcdistdeg($ra1, $dec1, $ra2, $dec2){
  $cosA = sin(deg2rad($dec1)) * sin(deg2rad($dec2)) + cos(deg2rad($dec1)) * cos(deg2rad($dec2)) * cos(deg2rad($ra1 - $ra2));
  return rad2deg(acos($cosA));
}

And this function returned NaN for perfectly valid input values (around NGC 4103). So the obvious solution was to force the range with a safe_acos function, similar to

function safe_acos($n){ return acos(min(max($n,-1.0),1.0)); };

Very, very annoying.

facebooktwittergoogle_plusredditpinterestlinkedinmail

A walk on memory lane – dselena

Working with Renesas chips and the GUIX framework made me take a walk on  memory lane, a program I wrote almost two decades ago.

facebooktwittergoogle_plusredditpinterestlinkedinmail

A little charging station

I like horizontal extensions :)

I like stuff that’s standard, modular, dumb, fault tolerant and degrades gracefully. The mount, the camera, the heating, the guiding — these all have different priorities, different needs and complexities. This is why I chose to use the 12V 7.2Ah standard UPS batteries, many of them, in separate circuits. This setup, obvious from the way the charging is solved, is for occasional one night sessions, not continuous deployment.

HEQ5

One circuit is for the mount. I put one or more batteries in parallel, or more like max(): the batteries are isolated from each other through diodes.

DSLR

My Canon 1100D (modified) does work from a USB phone charger, but it has its own 12V battery. It works well, non stop all night, from a single battery, without depleting it. A fellow amateur astronomer has already asked me to make him a similar wonder-box :D See details.

The DSLR was the last item that a voltage other than the one provided by the standard 12V batteries. Its own batteries meant special care, special costs, and thankfully that is over, once and for all. (tovább…)

facebooktwittergoogle_plusredditpinterestlinkedinmail

When to, what to – photograph

a year of the Lagoon nebula, observed from a forgotten corner of Transylvania

You may already know my astronomy catalog search engine, the DSO. It includes all the catalogs we amateurs use: the Messier, Caldwell, NGC, IC, Arp, SH2, Collinder, Melotte, Abell planetaries, it even grabs the list of exoplanets from a wiki page to always be up to date. But this is not all. It includes some ugly formulae to know about the position of the Sun and the Moon, and do some math based on  the geolocation of the user. The DSO however is more like a text mode tool, or an API. It is good to just look up what Messier 51 or NGC 7000 is. Anything more complex requires some heavy wizardry even I don’t master and need to look up in the help I fortunately did write.

(tovább…)

facebooktwittergoogle_plusredditpinterestlinkedinmail

My photo planner

a print from my planner

A few month back I ran into problems trying to identify certain deep sky objects that showed up on my pictures. Stellarium – although I like it – is good at searching for known objects, and not by coordinate search, and I cannot script it the way I want. Nova.astrometry.net is also a very useful tool, but it does not have all the objects I grew able to image. I built my own deep sky database, a strong search tool, but that one is a search tool only with no visual sky, although I linked it to Aladin Lite. Aladin and Simbad – I like them, but they lack an easy coordinate search – and I really mean easy when I say so. Obviously, Aladin and Simbad are mainly for professionals, I guess. Stellarium has a photo planning feature, but – even though it can show Aladin’s sky, still no button by default -, it doesn’t fit my hands. So I felt like everything I need is out there somewhere, but the dots are just not connected.

I wanted to have all my knowledge at my fingertips, everywhere, and finally to have a robust output, that doesn’t fail when going offline: paper. Needless to say, my thoughts converged towards a website.

So I wrote my own photo planner, based on the Aladin Lite API and my DSO search engine and Simbad’s coordinate search.

(tovább…)

facebooktwittergoogle_plusredditpinterestlinkedinmail

Mélyég-adatbázis a csillagtúrán

A DSO felület éjszakai üzemmódot használ

Észrevettem, miközben közreadáshoz készítettem elő a fotóimat, hogy azok máris mélyebbek, mint amilyen mélyre a legtöbb program megy.

A Stellariumnak megvannak az erős és a gyenge oldalai is. Az astrometry.net keresője (angolul plate solving) szintén korlátok között mozog. A Simbad adatbázis és az  Aladin böngésző asztali és web változata egyaránt gazdag kincsesbányája az asztrofotósnak, az asztali változatban a mozgó egér alatti objektumot kikeresi és mutatja például. Ezt a web változat is igazán tudhatná, de nem tudja sajnos (lennebb a javítása). A gyengéje, hogy mintha valós időben készítené elő az égboltot lefedő képeket, így elég lassú. De különben is, valami kézhezállóbbat szerettem volna.

Ezért készült a csillagtura.ro/dso. Azt hiszem, hadilábon állok a programjaim elnevezésével :P. Találtam githubon ezt az adatbázist, bő kétszázezer objektummal. A fotóimhoz jó ideig kellően mély lesz ez az adatbázis. A CSV fájlt SQL adatbázisba emeltem, az objektumok elnevezését pedig jelentősen bővítettem angol és magyar nyelven, illetve behelyeztem néhány román nevet is. Aztán megírtam egy erős keresőfelületet, amely szinte minden szempont szerint ki tudja ásni az adatbázisból a keresett objektumokat. És ami fontos: kúpkeresést is tud, egy objektum vagy egy adott koordináta környezetében. Hozzáadtam még egy virtuális égbolt funkciót: a látogató GPS-e alapján a program az objektumok látszó magasságát és óraszögét is kiszámolja.

(tovább…)

facebooktwittergoogle_plusredditpinterestlinkedinmail

DSO database on my Csillagtúra

A printscreen of the UI. It uses night mode.

While posting my pictures, and describing the photographed objects, I noticed they are already deeper than most of the shallow catalogs and softwares go. Stellarium has its strengths but also its weaknesses. Astrometry.net’s plate solver also has its limits. The database behind Simbad and the Aladin viewer their website has embedded is great in many ways – on the desktop edition I can point with the mouse, and the pointer’s coordinates get resolved into an object, but no such feature in the web version (I added it, see below). A weakness is that both the web version and the desktop edition are slow to render the sky, I wonder whether they have any caching or the tiles are morphed real time. Anyway,  I wanted something more personal, integrated into my website.

So I made csillagtura.ro/dso. I think I am bad at naming my programs :P. I found this database on github, with more than 200k objects. This database should cover my deeper photographs for a long time. I converted the CSV into an SQL, and extended it with popular names for objects mainly in English, many in Hungarian and some in Romanian. I also added functionalities like search by virtually any aspect of an object, and, very important: cone search around each result, or just a cone search around some coordinates. I also added some virtual sky features: based on UTC time and the visitor’s gps coordinates retrieved from the browser, my program also calculates the objects’ alt-az coordinates.

(tovább…)

facebooktwittergoogle_plusredditpinterestlinkedinmail

StarHeal – how I handle the dense star fields

Left: the original. Right: the automated output: less prominent stars, no panda eyes.

The Milky Way offers some great wide angle views for the astrophotographer. But there is a catch: the dense star field. While in theory stars are point like, ie subpixel sized, in practice the seeing, some worse than ideal transparency, lens errors, bad focus, a not that parallel lens and sensor, a bit of dew – all work against the astrophotographer.

While I can’t solve all the problems, I sure can try. So I wrote a program. I found that I can mitigate some of the problems: the blown up stars, the panda eye image artifact around stars with middle range luminosity and the overall visual impact of the star field. I continued to develop the previous version of my software, so here’s what I’ve got now.

The program

I wrote the program in PHP because it is the language I mainly use. It is not the best choice, by far. But it does the job I expect it to do. All you need is a webserver, some storage space, memory and time. You may download it from here. (tovább…)

facebooktwittergoogle_plusredditpinterestlinkedinmail

Jól kalibrált monitoron mindegyik számnál elkülönülő árnyalat látszik. Ha mégsem látszanak, akkor a megjelenített képek színhiányosan rajzolódnak ki. A monitort valószínűleg kalibrálni kell.

You should see distinct shades for each number. If those shades are not clearly visible, the displayed pictures will lack accuracy. Your display most likely needs to be calibrated (brightness, gamma, contrast etc.).