Friday, July 14, 2017

The Saga of the Celestron CGE Mount

It is with great sadness that I announce the passing of my Celestron CGE mount.  Adopted from my Uncle Chris, it lived a good life, and helped me get some awesome images and take my fledgling astro-imaging hobby to the next level.  You will be missed!

So basically, here's the rundown.  I'm sharing because I have seen other CGE users run into similar issues - although, I'm the first case of a complete failure that I've yet come across.

In the beginning...

Looking back through my log, it's clear that the real issue started early on, I just didn't recognize it for what it was yet.  I got the mount in February 2016, and it wasn't long after that I started complaining of it "not being able to handle the cold."  I mention having very bad initial guesses for alignment stars as early as late February, and definitely in April.  Also in April was the first time I recorded that it "moved on its own," probably an instance of it "jumping" when I either touched a cable or the cold shrank the metal in the shielding contact in the port, causing bad ground contact and the motor to jump.

Long story short, here is what was happening: So the Celestron CGE is two parts, the electronics pier, and the mount head itself.  The two are connected by...wait for it...ethernet cables.  Worse, they used shielded ethernet cables - and worse yet - they use the shielding as a ninth pin to conduct the ground signal to the RA axis.  (Whenever I tell my electrical engineering friends about this, they are as flabbergasted as I am.  If you are a Celestron engineer and reading this...please please please never do something so dumb again.)  To top it all off, if the ground signal to the motor is lost, the motor starts slewing out of control, at a speed higher than the highest normal slewing speed, and that motion is not encoded (meaning, if the mount slews this way for just a short period, it doesn't know that it moved, and I have to restart the entire mount and re-align all over again).  I hit the internet over this issue, and eventually it came down to those blasted ethernet cables.

The first thing I tried, back in July 2016, at the recommendation of many other CGE users, was to replace the shielded ethernet cables with flat, more-flexible ones.  This appeared to work, and since the weather was warm, they were pliable enough and the metal expanded enough that I had several nights of success without any issues.  I also got cable guides that I attached to the mount to let me create some slack on the cable where it goes into the mount housing so that it wouldn't get pulled.  This worked for a while, but then as the cold weather of fall came again, it became clear that a more drastic solution was needed.

The Bennett Mod

Many CGE users online recommended the Bennett Mod.  There were so many CGE users who had this exact same issue that a Canadian, Gary Bennett, finally created a mod kit to fix it.  Basically, it replaces the ethernet ports, both in the electronics pier and the mount housing, with an 8-pin screw-on connector that was much more robust.  The chassis was still used as the RA ninth pin, but a good connection was ensured because the cable screws on at both ends.  After reading about all the success that many other CGE users on forums had, and saw how many people swore by it and said it solved all of their CGE issues, in December 2016 I bit the bullet and paid the $400 for the "easy" version of the kit, which doesn't require you to drill new holes into the mount housing.  I received the kit, and it was indeed rather easy to install - no soldering required, just unplugging headers and plugging in the new ones, which even came labeled.  The instructions were quite clear and had helpful pictures.  It took me about two hours (I meticulously checked the tightness of the connections, triple-checked that I was plugging the right cable into the right header, etc), but then it was done.

So I plugged int back in, turned it on, and after getting some connection errors and tightening up some connections, got both axes talking to the hand controller.  I hit Enter to find switch position...and while dec worked on finding the switch position no problem, RA started slewing out of control!  Pressing keys on the HC yielded error codes about no response, and finally I just had to cut the power before the mount tipped itself over (it's rather top-heavy).  

I got in contact with Gary Bennett, and he was very helpful at providing me with ideas of things to check to try and figure out what went wrong.  He even sent me the schematic for the mount, and I dug out my multimeter and meticulously went through every connection, testing for proper voltage and connectivity (or grounding).  Everything looked by the books, at least as far as I can tell, being a physicist and not an electrical engineer.  The dec axis worked just fine, and it continued to work even when I swapped the RA and dec cables to test.  I've got a whole bunch of notes on all of the strange behavior that was going on, but I won't exhaust you by putting it all here.

Calling In the Pros

After struggling with it for a few weeks, I finally got in touch with Dr. P. Clay Sherrod, who does a "supercharge" service for several kinds of mounts, hoping that his familiarity with the inner workings of my kind of mount would be able to help me figure out what was wrong, and how to fix it (his website is here).  He gave me a great deal of helpful advice, and I re-did a number of things I'd already tried, and also tried some new things to test it.  I looked for burned out resistors, checked the function of the limit switches, swapped out hand controllers, used different power sources (AC wall power vs DC battery), checked resistance across the optical encoder, plugged the ethernet components back in (essentially "un-doing" the mod), all sorts of stuff.  But, two months later, I was still getting nowhere.  So I had a choice: throw in the towel and get a new mount, or take a several-hundred-dollar bet and ship it to Dr. Clay for diagnosis and, hopefully, repair.  I just had a feeling (and my hunches are usually right) and there was just a single bad connection somewhere, some ground wire that needed to be re-soldered or replaced, something cheap and easy that would just unravel the whole mystery.

Dr. Clay spent several weeks on it, even taking it into his electronics lab at the University of Arkansas to test all the circuitry.  He was just as baffled as I was.  After much effort, I finally had him send it back to me.  I started shopping for an alternative mount, although I was unable to find anything that matched the capability and payload of the CGE.  Everything was either too light (55 lb payload or less) or too big (75 lb payload or bigger).  The CGE had a 65-lb payload capacity, and only weighed about 40 lbs.  In astrophotography, you want your mount to be able to carry twice your actual payload in order to have good tracking; between my 11-inch telescope, the guide scope, and the camera, I am at about 32 lbs, so I really do need about a 60 lb capacity.  But anything with that capacity was beyond my pricepoint, so I was going to have to settle for something like the Celestron CGX, which has a 55-lb payload capacity and cost $2200.

Another miracle, of a sort

So far in my astrophotography journey, I've had a great number of small miracles.  Nearly all of my equipment has been given to me, or at least sold at a steep discount.  Literally the only things I have purchased on my own at full price are my DSLR and some miscellaneous parts and pieces, like dovetail bars from ADM or cables.  My C8, C11, and Borg refractor were all gifts; my Orion ST-80 was sold by a friend on the cheap; my QHY5 was also sold to me on the cheap.

So when Dr. Clay emailed me and told me that he had a Celestron CGE Pro, just back from Celestron refurbishment (and Hypertuned!) that he would sell me for $2k, I about fell out of my chair.  The Pro is the successor to the CGE, with a payload capacity of 90 lbs, and - wouldn't you know it - screw-on 8-pin cables (and even a screw-on DC power port).  It sells new for $4,500.  My only reservation that I had to sleep on for a few nights about it was that it weighs a lot more than the CGE did - the EQ mount head alone weighs in at a hefty 75 lbs, and then there's the counterweight bar and electronics pier in addition to that.  Luckily for me, the mount head comes apart into two sections, but they are not very evenly distributed - the upper portion still weighs some 50 or 60 lbs.  So, of course, I bought it!  And, bonus points, it arrived just in time for the 2017 Texas Star Party.  Blessings all around.

So...now what?

As far as Dr. Clay and I can tell, something got fried when I installed the mod kit.  Dr. Clay thinks it's a juxtaposed cable in the mod kit, but Gary Bennett says he tests each kit on his own CGE before shipping.  I followed his instructions to a T, and I am no foreigner to circuitry - I am an experimental physicist, after all, and have soldered my fair share of both low- and high-voltage circuits and have thus far not blown anything up.  And this didn't even require soldering, just plugging stuff in, it's very nearly fool-proof.  So, who knows.  It may have even been completely unrelated to the Bennett mod.  The last night I used it, in November, it did the slew-like-crazy thing, and then it under-slewed in dec several times in a row, even with power cycling.  Maybe it broke that very night, before I even bought the Bennett Mod.  We will never know.  

As far as the CGE itself goes, I would like to sell the parts to other CGE owners, since they are hard to come by now that Celestron has discontinued it.  But I'll have to sell them with some kind of money-back guarantee, since I don't know which part is the fried one.  I haven't gotten around to it yet, so we'll see.

As far as the new CGE Pro goes, it was a champ at Texas!  I guided as long as 7 minutes, and the mount wasn't even level (my tripod has a gimpy leg, and of course that always ends up on the lower side).  It is, however, prohibitively difficult for a single person to set up and use, so it is going to become my long weekend and star party scope, situations where I can set it up and leave it up for several days (and have some help getting the heavy mount head on top of the rather tall electronics pier and tripod combo).  

Thursday, July 13, 2017

A Guide for Guiding

Yes, here it is, at last, a guide on guiding!

Background

Guiding is a technique used to firm up the way that a telescope mount tracks across the sky.  I'll speak specifically to German equatorial mounts, shorthanded as CGEMs. (although I believe it is possible to also guide an alt-az mount - my NexStar SE has guide ports).  CGEMs move on two axes - right ascension (RA), and declination (dec).  These are the coordinates with which the celestial sphere is mapped from our earthly perspective.  When properly polar aligned (meaning, the telescope is close to looking at Polaris at its home position), a mount mainly moves in RA as time passes through the night to track the object.

The mount moves by moving gears.  However, gears cannot be made perfectly, or else they would never actually be able to turn.  So there are small imperfections in the motion of the mount - too small for your eye to notice, but you will see it in the camera as your stars streaking.  This is called periodic tracking error, since it takes several minutes for the gear to make a complete turn, and you will see the same motions at each point along the gear.  Some mounts have Periodic Error Correction, or PEC, which counteracts this periodic tracking error.  This is one option for getting those long-exposure streak-free images, but requires you to manually guide the telescope for several minutes (8 minutes on my Celestron CGE) by watching a star and keeping it precisely in the crosshairs of a lit-reticle eyepiece using the hand controller while the mount records your corrections, and then plays them back.  To further complicate the matter, most mounts don't have absolutely-encoded gear positions, but only relatively-encoded - which basically boils down to the fact that you would have to do PEC every time you brought your telescope outside.  (My Celestron CGE Pro doesn't have absolute encoding, but it does have a well-defined switch position, which allows you to record PEC permanently).  There are fans of each method, but when I first heard about each of these options, guiding sounded better to me.

The gist of guiding is that you have a second camera locked onto a star that watches for when that star moves, and then a command is sent to the mount to the mount to move a tiny bit back the other way to compensate for it and prevent the motion from showing up in your picture.  There are several options for the placement of that camera - many people (myself included) mount a smaller telescope on top of their imaging scope, or beside it on a dual plate, and attach the guide camera to that.  Others do what is called off-axis guiding, which is where you attach a device to the back of your telescope before the camera & filters that picks off a small fraction of the light and sends it to the guide camera.  There are also expensive CCD cameras that have two chips - one for guiding, and one for imaging.
An 80-mm f/5 refractor (the Orion ST-80) sits atop my Celestron 11-inch SCT on my Celestron CGE mount.

The Guide Scope

In an ideal world, you would want your guidescope to be no less than half of the focal length of your main telescope.  If you have a 650mm Newtonian, then you would want at least a 325mm refractor.  That's easy enough - my Orion ST-80 only weighs a couple pounds and has a 400mm focal length.  Unfortunately for me, my C11 has a 2800mm focal length (yes that's right folks, there are 9 feet of optical path length folded up into that tube), which would need a 1400mm guidescope!  Luckily for me, I have an f/6.3 focal reducer that reduces the effective focal length to 1764 mm (2800 * 0.63 = 1764), and I can't take images much longer than 5 minutes around here anyway because of light pollution, so yes, I make a 400mm focal length telescope work.  You can really get away with less than that half marker.  But don't go too crazy!

The Guide Camera

Really, honestly, a cheap monochrome CCD camera will do.  I have an old QHY5 (yes, the original monochrome, the little red hockey puck) that works great.  Other examples include the ZWO ASI120MM (and probably the lower-numbered models would work too), really any of the QHY5's, Meade Deep Sky Images, Orion StarShoots (I would not recommend the Color Imager IV, however - I have one, and I have thus far gotten 0 stars to show up even with 10-second integration times), and a wide variety of other little CCDs, like $100-$250.  Unless you are doing off-axis guiding where you need high sensitivity, one of these will do you just fine.  Bonus, they usually also make great planetary imaging cameras if you add in some filters!

You will want to get monochrome for a guide camera - color will work, but you will get higher sensitivity from monochrome, and guiding software throws out the color data anyway.

Software

There are many great people out there who love to code great programs for fun.  And thank goodness for them, because there is some wonderful astronomy freeware out there!  The name of the game for guiding is PHD (Push Here, Dummy), and can be found here.  Good news, Unix-ers: it's available for Windows, Mac, and Linux.

There's a reason it's called Push Here, Dummy.  It's because you just hit a series of buttons along the bottom of the screen to get going, for the most part.  I'll do a walkthrough below, after a few more sections on drivers and connecting stuff together.

Drivers

In addition to PHD, you're going to need a few drivers.
First, the ASCOM platform.  ASCOM is the standard for controlling a wide variety of astronomy devices, from cameras and telescopes to focusers, filter wheels and even motorized dome roofs.  The platform is the basis for all of your other ASCOM drivers.

Second, both the camera driver and the ASCOM driver for your camera.  Get your camera driver from your manufacturer, and you should find the ASCOM driver either also on your manufacturer's website, or on the ASCOM camera driver page.

Third, if you are going to use a program like digiCamControl or DSLRShutter or something to control your DSLR now that you will be able to do images longer than the built-in 30 seconds, be sure to download your camera's driver too.  (BackyardNikon/BackyardEOS comes with all the drivers already).

Connecting Stuff Together

All right, so this part takes a little attention on your part so that you don't fry your mount.  Hopefully, your mount came with a cable that plugs into its RS-232 port - it will look like a phone jack port. (Don't use the "Auto Guide" port.)  On Celestron mounts, this port is located on the hand controller itself - the same one you would use to update the firmware.  Unfortunately I am not at all familiar with basically anything besides Celestron, so consult your manual to find out where your RS-232 port is.  But the cable will have what looks like a phone jack on one end, and a serial cable connector on the other.  If you don't have one, it is very important that you get the one that is designed for your mount.  If I plugged my Celestron mount cable into the Losmandy Gemini mount out at the observatory, I would fry the mount.  If in doubt, consult the manual - it will have the pinout (which pin is signal, which is ground, etc.)

Once you have the RS-232 cable in hand, pick up a serial-to-USB converter on Amazon on the cheap.  There's not really anything special you need to get here.

Plug the serial-to-USB converter and your guide camera into your computer.  Since I use a tablet with exactly one USB port, I got a USB hub.  I got one that can be powered (by plugging in a micro-USB cable to a standard cell phone charging plug, spare battery, or telescope power tank with USB ports, which delivers 5V/1A) since I discovered that my guide camera uses a lot of my tablet's battery power.

Use the USB port on your guide camera, not the ST4 port (the one that looks a bit like an ethernet or phone jack).

Getting Started With PHD

There are a lot of tutorials out there for how to use PHD.  There is probably stuff that I am not doing that would bring me greater success.  But I'll walk you through how I do guiding that gets me the kinds of results I'm currently getting - which, let's just say, are pretty sweet.

When you start it up, click on the first icon on the bottom of the screen - the picture of the plug.

Click Manage Profiles, and then New Using Wizard.
Select your guide camera from the list.  (Note that my Orion StarShoot Color Imager IV shows up under "Windows WDM-style wecam camera" instead of Orion StarShoot, and my QHY5 shows up under COMS QHY5 (ASCOM) so it may not be the one you think it should be - try a few).  Once you've selected your camera, you can click "Detect" and have it automatically detect the pixel size.  On that same screen, enter your guide scope's focal length (in mm).  Leave the guide speed at 0.50 (although make sure your mount is also set to this value).  Click Next.

Select your mount from the list.  This will show any ASCOM mount drivers you have installed, along with some other options.  Click Next.  Click Next again, unless you are super cool and have adaptive optics somehow on your stuff.  Name your profile ("CGE Pro with QHY5 & Orion ST-80," for example, or if you cleverly name each of your rigs), and then hit Finish.  Go ahead and leave that "Build Dark Library" box checked - you will want to do that.  Finally, hit Connect All, and your devices should connect.  

If you get connection errors with the mount, a) check all your cables, and then b) click on the little icon between the box with the mount name and the "connect" button and make sure you have the right COM port chosen.  You can try each of the options there, or you can find out which one it is by going to your Start Menu, searching for Device Manager, scrolling down to "Ports (COM & LPT)" and looking for which one has your serial-to-USB converter on it.  I always plug my mount into the same USB port on the hub to avoid having to deal with this.

Now you should see a "Build Dark Library" window.  Follow its instructions, and the defaults are all fine.  Basically what a dark library does is it eliminates the hot pixels that your CCD camera is bound to have so that PHD doesn't think they are stars.  This process will take a few minutes.  Make sure that you are not shining any light anywhere near your guide scope during the process, and don't do this during the day (unless you do it in a dark closet).  

Now you are ready to start acquiring from your guide camera.

Focus & Calibration

Slew to a bright star - you'll need to focus your guide scope.  Click the next button along the bottom panel - the one with the green circled arrows.  This will start image acquisition.  For focusing, especially with a bright star, I'd choose 0.5s from the drop-down menu along the bottom.  At first, the image may appear extremely noisy with lots of banding.  Don't fret - PHD heavily stretches images in order to find stars.  This will calm down when you are near focus.  In fact, that's how I tell when I'm near focus - when the noise starts to drop.  Go slowly, since the image is only updating twice per second.  Bear in mind that your guide scope may not have enough in-travel or out-travel for your guide camera - this is where extension tubes and mirror diagonals come in handy (for when you need to go out further), or a Barlow (for when you need to come in closer, but keep in mind with a Barlow, your light intensity will drop and your field of view will shrink, so you may need to increase your gain or integration time.  This also effectively doubles your guide scope's focal length, so set settings accordingly).  

Once you are focused (you'll see stars, and they don't have weird fuzzy circles around them, unless the star is very bright, like Vega or Sirius), then you are ready to calibrate.  Slew to your target.  Since you entered your focal length in the setup wizard, PHD will already have calculated what step size it needs to take in order to see the star move.  Change your integration time to 1-4 seconds - 3-4 seconds is best so that you don't guide on the seeing (atmospheric motions can cause the star to appear to move when it has not - longer integration times smooth this out).  Click on a star in the image, or press Alt+S to have PHD pick one for you (it can oftentimes see stars that you cannot), and then click on the PHD icon in that bottom panel, the green circle with the crosshairs.  This will start the calibration process, which will take several minutes.  It will move the telescope north, south, east, and west, and watch how the star moves and how much it moves when it sends a certain-length pulse to your mount.  Once it's complete, it will begin to guide your mount, and it will say "Guiding" at the bottom of the screen.

There are two error messages I tend to get - something about non-orthogonality, and something about too northerly of a declination.  The non-orthogonality one, I finally discovered, usually simply means that your camera is at a cant with respect to the telescope.  It's best to attach it "upright" - meaning, the USB and ST4 ports are in line with each other and parallel to the ground when the telescope is in the home position.
Left - ports parallel with the ground when the guide scope is upright.
Right - camera is canted, and can throw weird PHD errors.

As far as the northerly declination goes - the advice I have been given with PHD is to have new calibration data for each of your targets, and to take that calibration at or near your target.  Sometimes, my targets are far to the north, like M51 or M81.  These can cause trouble for PHD because the telescope won't move hardly at all in RA when it's looking north, since that is where the celestial pole is.  But I usually have success guiding here anyway, and just ignore the message.

Speaking of that advice to get a new calibration at each target, here is how you do it: first, stop guiding before you move to your next target by clicking the stop sign button in the bottom panel.  Slew to your new target (don't forget to focus your main telescope again if you have an SCT!).  Then go to Tools -> Modify Calibration -> Clear Calibration Data.  At your new target, hit the loop button (green arrows), then the guide button (PHD icon - green circle with crosshairs), and PHD will re-do the calibration process.

Guiding

Now that you are calibrated & focused, you are ready to guide!  If you had any issues with calibration or other things, you can click the brain button to access settings.  Consult Dr. Google.

Now that guiding is going, you'll see the graph on the bottom start to populate.  This shows the corrections that PHD has had to send to your telescope, and how severe they were.  If you have tall spikes larger than 3 or 4 arcsecs that are all over the place, then your alignment or polar alignment probably isn't very good.  Keep in mind though that it takes a minute or two to "quiet down," so wait for things to shake out first.  (Or, try imaging anyway - sometimes my images turn out just fine even when the guide plot is crazy).
An example guide plot.  My stars came out perfectly round like this on an 800mm refractor using a 102mm refractor to guide.

If a cloud rolls through, or you forget to turn the observatory dome, or your guide scope gets dewy, or any number of things that cause PHD to lose the guide star, it will start making computer notification noises at you.  So keep your volume turned up!  It can save precious time during the night to know right away when something is amiss.  (There's a plugin for Sequence Generator Pro that will send you emails when PHD is having a problem).  

All right, so those are the basics, and that is my process.  Again, check out the variety of other sources on the internet that have tutorials and advice for guiding and PHD, especially when something isn't working.  There are a lot more settings to tweak than I've talked about here (or have even tweaked myself), but with this process, I've gotten at least 7 minutes of guiding on my CGE Pro with my C11 as the imaging scope and my Orion ST-80 as the guide scope, and at least 20 minutes of guiding out of the memorial scope, which is an 800mm refractor with a 102mm guide scope on a permanent pier.  

Sunday, July 9, 2017

A Super-Duper Primer of Astrophotography Part 7 - Target Acquisition

Getting your target for the evening centered in your eyepiece and focused isn't always as simple as it sounds at first glance.

Target Acquired! - How to frame your shot

It's a multi-step process.  If you just put the name into your goto hand controller, chances are it won't be centered, and you might not be in focus either if you have a reflector, especially a Schmidt-Cassegrain or anything with a big giant mirror.

1. Sync on a nearby star

I have used two kinds of mounts so far - Celestron, and an older Losmandy Gemini II.  I can't speak for all brands, but I think many of them have some kind of Sync feature.  I recommend it - it will firm up the pointing model for that part of the sky, making both the goto and the tracking better.  The Losmandy mount I use is on a pillar planted in the ground, so it is permanently polar aligned, and well enough so that I don't even add alignment stars - I just sync on a star near my target, and go.

Generally, I use my SkySafari app to find a nearby bright star to the object I'm about to image, and I sync on that.  Also, the sync will work better if the star is on the same side of the meridian as your target, so be wary of which star you choose if you are shooting near the meridian.

2. Focus

While you're at a star that is near your target (and on the same side of the meridian), go ahead and use that for focusing.  There are a number of ways to achieve focus.  There are two that I use more frequently: Live View on my camera, and a Bahtinov mask.

Live View

Back before I had BackyardNikon, I would go to the bright sync star, turn on my camera's Live View, and zoom in realllllly close.  I would then adjust the focus knob until the star appeared as small as possible.  Not terribly scientific, but it worked well enough.  Unfortunately for SCTs, the focal point is rather broad - for nearly a quarter of a turn, the star will appear to be the same size.

Now that I have BackyardNikon, I use its "Frame & Focus" mode to pull up Live View on my computer, which has crosshairs and a zoom-in section.  When the star is in the center of the zoomed-in section, BackyardNikon will give you a FWHM (full-width half-maximum) reading.  I adjust the focus knob until this is as small as possible, mentally averaging for the seeing conditions.  This has the same problem though where the focal point is still rather broad.

Also, for you Schmidt-Cassegrain owners out there, make sure the last focus knob movement you make is ccw (counter-clockwise) - this is the "up" direction for mirror movement, and will put tension on it against gravity, which will hold it more steady.

Bahtinov Mask

I use Live View for this too, but the Bahtinov Mask is a little more accurate.  It's basically a piece of plastic with lines forming a pattern that will cause a spiky diffraction pattern at the eyepiece/in the camera.  When the central spot is in the middle of all of the spikes, then you are in focus.
Borrowed from here.

I'm sure there are other tools out there, I just haven't used them.  Focusing an SCT for imaging is kind of a crapshoot anyway, at least in my experience - my stars never turn out as pointlike as they do in a refractor. Stars will always appear softer in an SCT because of the large central obstruction (the secondary mirror).

3. Precise Goto

I think this feature is unique to Celestron mounts, but I may be wrong.  If you have a Celestron mount with relatively recent firmware on the hand controller, definitely use this feature!  It's one of the main menu options under the Menu key.

Basically, you tell it which object you want to slew to (using any of the same databases already available on the HC), and it will search its catalog for a nearby bright star.  You select one (choose one on the same side of the meridian), slew to it, and center it in your camera (this is where the crosshairs in BackyardNikon come in handy).  Then hit Enter, and it will slew back to the object - which will be nearly perfectly centered.

4. Test Shots

To double-check that the target is where I want it in the frame, I'll usually take some shorter-exposure test shots.  If it's a relatively bright object, it'll show up in a short exposure, say 30 seconds (and sometimes in the viewfinder, which I use surprisingly often to center things).  If it's rather dim, then you can at least see some of the more prominent stars in/around the object, and use those plus your favorite astronomy app to line things up.  

Plate Solving

Plate solving is kind of a neat concept - the mount tells the program where it thinks it's pointing, then the program uses your image acquisition program to take a short exposure, and then it uses a downloaded database to plate-solve the image and figure out which stars you are looking at.  It then will use your ASCOM driver (the same as needed for guiding) to slew your telescope a little bit, after which it will take another image and plate-solve it, and this process continues until the reference stars are where they should be for your target to be centered.  I tried AstroTortilla for this once, but it has a bit of a steep learning curve, and I'm pretty good now at centering my targets without it.  But it can be awesome for automating long imaging sessions.  I'll probably check it out at some point, and then write up a tutorial for it.


Once your object is centered, you're ready to image!
Don't forget to re-focus your scope whenever you do a meridian flip.  Even refractor users, unless you have a locking focuser, it can slip, and even with a locking focuser, your camera could adjust slightly as the telescope slews around.  It's better to take a minute to re-focus than to waste hours of hard work on un-focused images!

Planetary Imaging

Imaging the planets is an entirely different beast than imaging DSOs (deep sky objects).  The techniques are completely different, and the threshold of equipment you need is much lower.  But one thing remains the same: you might think that your data is bad just by looking at the single frames. I was at a star party last September where I was chatting people up and usually getting onto the topic of astrophotography.  One of my fellow party-goers said he had some webcam video he took on his telescope of Jupiter, but didn't know what to do with it, and didn't think it would be any good, judging by how shimmery, dim, and fuzzy the individual frames in that video looked.  But I got him to install RegiStax on his laptop and then walked him through the process, and his image actually turned out quite amazing!  He happily showed it off to everyone else at the star party of the rest of the weekend.  Bottom line, never underestimate what a good computer algorithm can do to seemingly poor data.

Gear

Mount

Unlike deep sky imaging, you don't need a mount that tracks or guides super well.  I use my NexStar SE alt-az mount all the time, which has developed some slop and can't stay on a target for very long.  My 20-30 second deep sky images always had period error and drift in them.  But for planetary imaging, as long as you have a mount that tracks long enough to have the image not move too much over the course of a few minutes, you're good.

Telescope

Aperture does not rule the roost for planets.  In fact, large aperture can work against you - it provides a higher cross-section for light that is disturbed by the atmosphere to enter your telescope.  This is part of the reason why my 8-inch always gets better planetary images than my 11-inch.

What does matter, however, is focal length.  If you hook up a DSLR or a CCD with a large chip to a 3-inch refractor, the planet in question will appear quite small, and you won't be able to get much detail. So instead, you need something with a long focal length so that you can get a small FOV (field of view), and also not saturate your camera.  Different combinations of cameras, apertures, and focal lengths will give you different FOVs - I recommend this awesome tool for checking yours: FOV Calculator.  

Alternatively, you can get effectively longer focal lengths using Barlows and eyepiece projection - but be careful, a small aperture will have a resolution limit that you may well exceed.  The FOV Calculator can help you determine this too.

Camera

While I have used my DSLR for planetary imaging, I wouldn't necessarily recommend it to get the best images.  For one, recording a video on your DSLR can downsample your resolution.  For example, my Nikon D5300 has a 6,000x4,000 pixel chip.  However, it only shoots video in HD - 1920x1080 pixels.  So I'm automatically losing data and detail.

Instead, many cheap CCD cameras that are frequently used for guiding work great as planetary imagers.  I borrowed a ZWO ASI120MM from Miqaela, which you can get for $150-$200 and has a resolution of only 1280x960 pixels, and for reasons I do not quite yet understand, along with the fact that it is monochrome, my planetary pictures came out suddenly much more awesome, even when the seeing was average and not great.

With a monochrome camera, every pixel counts, as opposed to a color camera, where you have to use four pixels in order to get one pixel of image.  This is because of Bayer filters. Quoting myself from this post, in short, a Bayer filter is what makes a color camera able to shoot in color.  It's a filter that lies over the top of the pixels and has a color pattern, typically RGGB.  In other words, it takes four pixels to make one image pixel - one red, two greens, and a blue.  (The green is duplicated because it is the wavelength that your eye is most sensitive to).  So it cannot resolve as fine of detail as a monochrome camera can.  In order to get color images from a monochrome camera, you'll need a set of RGB filters, and I recommend putting those into a filter wheel for ease of changing them between video captures.

Observing Conditions

When observing or imaging DSOs, you care about having very dark skies, and care slightly less about the seeing conditions ("seeing" being a qualitative measure of how "messy" the atmosphere is - humidity, convection currents, etc, not including clouds and dust).  However, planetary imaging is the opposite - you can image a planet under a bright Moon, or in the middle of a city, and you won't see that light pollution.  However, atmospheric conditions dictate how well your image is going to come out, so you don't want to shoot through shimmering air currents rising from rooftops, or after a rainstorm, or other conditions that cause waviness in the air.

Data Acquisition

DSLR

If all you have is a DSLR, you should still give it a try.  Instead of single frames like you would do for a DSO, you will want to shoot a video.  This is because the image processing algorithm we will use - known as "lucky shot imaging" - takes many frames and finds the ones where the air happened to have a clear moment, and prioritizes those in its averaging algorithm.  If you shoot at 30 fps, your video only needs to be a few minutes long - typically, you don't need more than about 3,000 or so frames.  

Shooting video also gets rid of another effect - vibration.  Every time your shutter closes, it shakes the telescope a little bit, which will immediately cause your images to be blurry, not matter how good the atmosphere is.  On my DSLRs are least, in order to shoot a video, you have to turn on Live View first, which opens up the shutter.  Then you can start the video and let go of the telescope, and it'll take a few seconds to stabilize, but those frames will just get thrown out anyway.  Then you have hundreds of frames with no vibration from your camera shutter.

CCD

I'm pretty new to CCD imaging, so take my advice with caution.  

There are many CCD capture programs out there; the one I hear about most often, and the one I now use, is called SharpCap.  It's free, and has a lot of great features, including a recent update to SharpCap 3.0 that comes with some great ones, like plate solving and improved polar alignment routines.  

Every camera will have slightly different-looking settings controllers.  The main one you will want to adjust is exposure time.  You want to be able to see the planet, but you don't want any part of the image to saturate.  You can turn on the histogram in order to check this - the curve should be somewhere in the middle third of the histogram for best results.  Also, keep your gain at about the middle for best quality (I haven't played with this much yet, but mine is set default to 50%, and planets are so bright that you don't need to push the gain in order to see them at all).  

I recommend shooting the video in AVI format, since it's more common.  Again, you only need a few minutes - Jupiter, for instance, spins fast, and you can get blurring if you go for too long.  But remember that your CCD will probably have a lower frame rate, unless you have a USB 3.0 one plugged into a USB 3.0 port using a USB 3.0 cable.  My QHY5, for instance, only shoots 2-3 frames per second on USB 2.0.

Data Pre-Processing

Video Conversion

I have found that RegiStax can be a little finnicky on the types of AVI video it will accept.  Not every AVI file type is created equal, and as far as I can tell, I have no idea how to tell the difference.  

For my CCD video, I've been using VirtualDub to convert AVI to AVI that RegiStax likes.  It's another piece of freeware that I also use to make my timelapse videos (more on that later).  You just import the AVI file, then go to File -> Save as AVI, and then RegiStax will accept it no problem.  This might be because both of the CCDs I have used thus far for planetary imaging are kind of old.  So this is an option if RegiStax doesn't like your AVI files for some reason.

If you use a DSLR, you will definitely need to convert the video.  Nikons shoot in .MOV, and I believe that Canons do too.  RegiStax (and a lot of other things) don't like this format.  But in order to convert it to AVI, I needed some additional codecs.  I installed the Standard K-Lite codec pack.  I also needed to install FFMpeg for VirtualDub.  You can find instructions here.  This didn't used to work for me (it started to only recently, for reasons unknown), so I used to use VirtualDub to break up my .MOV's into thousands of still frames, but those still frames were low-quality JPEG files, which is probably why most of my planetary images before about a month ago are not very good.

Data Processing in RegiStax

There are probably a number of planetary stacking programs out there, but the two that are most commonly used that I know of are RegiStax and AutoStakkert.  I haven't used AutoStakkert myself yet, so I'm just going to show a tutorial of RegiStax instead.  I'll do it for RGB CCD video, since DSLR video is the same, except you only have to do it once (since it's color) instead of 3-4 times for RGB monochrome.

Align

First, import your R video file by going to Select up at the top and choosing your AVI file.  It should import fairly quickly.  Then, move the slider on the bottom of the screen until you find a frame that caught a moment of good seeing, where the image looks nice and sharp.  You can keep pretty much all of the default settings here, although I would change the "Limit Setup" option to "Best Frames" and put 65% in.  Your changes will save for the next time you open RegiStax.
Next, click the "Set Alignpoints" button, which will have a green bar underneath it.  RegiStax will automatically select some points on which to base its registration algorithm.  If the planet is small in your image, you may only get two or three points.  If you are processing the Moon, you may get a lot.  You can add your own by clicking on the picture, or delete points by right-clicking on the point.  This is helpful for if you have specs of dust in your image that RegiStax put an alignpoint on.  

Next, click "Align."  Now you'll wait while RegiStax registers all of the frames in your video.  Since there is most likely some small movements due to tracking errors in your video, this is very important, otherwise your final image would have the planet all of the place!  Also, this is the other reason you don't want more than a couple thousand frames - RegiStax will have a very hard time with large numbers of frames.

Limit


Next, click on the "Show Registrationgraph" button near the top.  It will bring up a graph.  By this point, RegiStax has scored and sorted all of your frames by quality, with highest quality on the left, and lowest on the right.  The red line shows the quality of that frame, and the green line shows the difference in position from the reference frame.

If there are any tall lines above or below the rest, click on the "Show Framelist" button, and move the slider on the bottom of the screen until the blue bar on the registrationgraph is sitting almost on top of the distant point.  Uncheck the boxes around that point.  (When you click on a frame shown in the box, it will move the blue bar to where that frame is at on the graph - use that as a reference).  

Next, close the Framelist box, and then move the slider until the blue line on the registrationgraph is as far down in quality as you're willing to go.  For good data like this, I like to stay above the first or second line down from the top.  Then, close the registrationgraph, and click "Limit."


Stack


The next screen has some additional options, none of which I have really messed with.  Feel free to mess with them sometime.  Click "Stack."  

Now we wait for RegiStax to stack the images.  RegiStax works by applying some statistics to your frames - if the planet changes from one frame to the next, it's due to atmosphere, so it keeps what is common between the frames, more or less.  I haven't yet found a good explanation of exactly how it does this.

Sharpen & Process


Once it's done, you will get a rather fuzzy and unsatisfying image.  But we're not done yet!  Click on the "Wavelets" tab.

Now, I might be a physicist with a master's degree and a PhD in my future, but wavelets are still magic.  So just move the happy sliders and you don't have to think too much on how it works!
I recommend using "Default" instead of "Gaussian" mode, but everyone has their own preferences, and one mode my sometimes work better in some situations than the other.  I've had better results with the Default mode so far.  You will see some sliders.
In a nutshell, moving a slider from left to right increases the sharpness, where 1 is more coarse, and 6 is more fine.  My word of caution: do not go crazy with the sharpening!  It can introduce all kinds of weird effects and noise that will ultimately make your image not that great.  So go easy, and wiggle the sliders around until you get something you like.  You can see the result immediately for a section of your image.  If you click on the "Show Processing Area" button near the top, it will show you the box it's doing the sample processing on, and you can click anywhere on the image to move this box.  To see how it affects the whole image, click the "Do All" button highlighted in green at the top.
This is generally what my sliders tend to look like:
Results my vary!

Now, there are some other processing options available in RegiStax too, over on the right side of the screen - brightness, contrast, gamma, etc.  Go ahead and play with these a bit too if you want. 

When you are satisfied, click the "Do All" button, and then the red "Save Image" button.  If you are doing RGB channel processing, save your file with "_R" "_G" or "_B" at the end for whichever channel you just processed, and save it in FIT format.  You can call it whatever you want, just make sure it ends in _R, _G, or _B.  This will let RegiStax know which is which in the final image stacking, and it will color them accordingly.  

Wash, Rinse, Repeat for RGB/LRGB


Now, re-do this whole process for your green and blue channel data, and L channel if you did that as well.  Having a luminance channel and help to sharpen your image, especially if it's done with an IR-pass filter, so I've read (although I have not yet tried this - I own an IR-pass filter, but my filter wheel only has 3 slots).  Save these FIT files out with their proper designations.

Final RGB processing

Once you have all of your _R, _G, and _B FIT files, open a new instance of RegiStax, and import those three files.  You may need to change the file type to FIT in the drop-down bar to see them.  

RegiStax may give you a few prompts, like "Stretch intensity levels?" (I usually say yes to this one) and "Process in B/W?" (Say no to this one for RGB processing in this last step).  

This process goes like doing the video stacks, but not we only have three frames.  I'd use red as the reference frame, since it's probably the best quality.  Click Set Alignpoints and then Align, and then make sure the slider is all the way over to the right before hitting Limit.  Leave the "Colour" box checked, but not the "LRGB" one.  Hit Stack.

Sometimes, the alignment won't quite work, and your red, green, and blue images won't quite be on top of each other.  Not to worry though - RegiStax has a tool for this (as long as they are not rotated with respect to each other).  Click on the Wavelets tab, and then click RGB Align.  A green box will appear - drag it and change its size to cover the planet images.  Then click Estimate, and it will calculate where it needs to move each channel in order for the images to be on top of one another.  If this doesn't work, you may need to say out your R, G, and B final stacked images as TIFFs and manually align them in Photoshop instead.  I'm not going to do a tutorial on that, but there are other places online that will walk you through it, including assigning color to those channels.

At the end, you should have a nice image!  (The one below is from another data set - the ones I have screenshots for above ended up with a red channel that was rotated with respect to the others, and I was unable to fix it in RegiStax.  I might go deal with it in Photoshop later, but my blue channel didn't turn out very well anyway for that one).

Saturday, July 8, 2017

A Super-Duper Primer of Astrophotography Part 6 - Stacking Tutorial

All right, so you've got your lights, darks, biases, and flats.  Now it's time to stack!
This will be a walkthrough of DeepSkyStacker, the only deep sky object stacking program I have used thus far.  It is free, and available at http://deepskystacker.free.fr/english/index.html.

Pre-Processing

Before you even open DSS, you need to go through your light frames and delete the bad ones.  "Bad" frames are ones with clouds that roll through and ones where periodic tracking error, wind, headlights, etc occurred - aka, the stars are streaked.  Here's a close-up example of a bad frame.
An example of a "bad frame" - the stars are streaked.

Note that having a plane or a satellite fly through your image doesn't necessarily mean you have to throw it away if you choose the right stacking settings in DeepSkyStacker to discriminate those out.  I regularly stack those and it works fine, and doesn't (usually) show up in the final image.

DeepSkyStacker Walkthrough

Loading Images

Once that is done, then go ahead and open DSS, and start loading in your pictures.  I have everything split up into folders - see the data management section of Part 4 of this series.
Be sure to click on the "Check All" button to check all of your light frames, since you've already gone through them to make sure they're good.

Choosing Parameters

First, hit the "Register Checked Pictures" button.  It will bring up a little window.
You can change the best % of pictures to stack - make it lower if you don't trust yourself to choose "good" subframes, if you want.  I usually set mine at 95.  It will still throw out more than 5% of the bad ones if they are all really bad.  (Believe me on that one).  

Click the "Advanced" tab next.  It shows you a slider bar for "Star Detection Threshold."  I usually find that 2-3% is ideal.  You can check by clicking "Compute the number of detected stars" - it will look at the first subframe you have, and detect how many stars it sees at the detection threshold you set, and then tell you how many it sees.  Look at the picture yourself and see if that makes sense.  If the number is ridiculously high, lower the threshold to a lower percentage.  If it's too low, raise it.  
Click OK.

Next, you will see a window summarizing the image data you've given DSS.
This is a good opportunity to check that your flats, darks, and biases are all the same ISO, and that your darks are the same exposure time.  DSS will flag these items if they're different.

Next, click "Recommended Settings."
You'll see a window with some buttons you can click on.  Some of the options will apply to you, some won't.  For instance, if it suggests to use bilinear debayering because your exposures are short/low SNR, click on that.  But don't click on "use super-pixel mode" unless you are processing narrowband images, like it says.  
Once you're done looking over the recommendations, click OK.

Now, the Stacking Parameters button will bring up all of DSS's stacking settings.  There is a lot here.  Changing settings will change the outcome, but you can rest assured that the default settings will do you well.  I'll list my settings here, but know that I haven't fully tested all of the options either.  These just tend to work well for me so far.
  • Result Tab: Standard Mode - uses the reference frame to set the view of the final stacked image.  If you have field rotation from using an alt-az mount, you may want to use Intersection mode, or else crop it out yourself later.
  • Result Tab: Align RGB channels - this doesn't always actually do it (especially when I use a light pollution filter), but why not.
  • Result Tab: Uncheck 2x & 3x drizzle for DSLR images.  Drizzling basically up-samples your images to get higher resolution, but DSS is limited in how much memory it can use since it's a 32-bit program, so high-resolution DSLR images will cause DSS to break if one of these is selected.
  • Light, Dark, Flat, and Bias/Offset tabs: I use Median Kappa-Sigma Clipping, with kappa = 2.00 and number of iterations = 5.  This will usually eliminate airplanes and satellites from your images, as well as hot pixels, cosmic rays, and other anomalies. Feel free to experiment with all of the other stacking modes, though!
  • Alignment: I just let DSS choose, using the Automatic button.
  • Intermediate Files/Cosmetic/Output tabs: I leave all the stuff in the Intermediate Files and Cosmetic tabs unchecked, and have it save out TIFF files.  Set whatever settings you want here.
When you're all done, click "OK."  Again, you can get started with just the default settings, it won't break anything.

Now you're off!  Depending on the size of your images and how many images you're stacking and using as calibration, as well as the amount of RAM and processor capability your computer has, this can take several minutes to an hour or more to complete.

Post-Processing in DSS

When your image is finally done stacking, DSS shows you the untouched result, and chances are it's going to look dark and gray!  Don't fret, this is perfectly normal.

Now comes the fun part.  First, go to the Saturation tab, and turn it up to somewhere between 18-25%.  

Next, go to the RGB/K levels tab, and move the middle sliders for the RGB peaks so that they are all mostly on top of one another.  If one is a little fatter than the others, or you can't quite get them all on top of each other, have the red peak sticking out the furthest on the right.  I find that putting them near about 1/3 of the way from left to right of the histogram works the best.  Now click "Apply."  You should start to see some color and more detail on your DSO.

It's still pretty dim, so let's mess with the Luminance curve (the dashed, curved line) by clicking on the Luminance tab.  You will develop your own preferred settings, but I'll show you mine to get started.  Definitely tweak these until you get what you want!  I find that dropping the level of the leftmost part of the L curve (using the second bar in the Darkness section) to about 94 or so, raising the height of the center of the curve (the second slider in the Midtones section) until it's about 1/3-1/2 of the way up the RGB peaks, and increasing the steepness of the center of the curve (first slider in the Midtones section, moving it left) to about 3-5 degrees (which basically increases contrast) works best for me, but again, play with these.  Hit Apply to see the results.

Once you are reasonably happy, click the "Save Picture to File" button on the left.  Make sure to select the "Apply adjustments to the saved image" button, or else your edits won't save!  I usually try a few different configurations of these settings and save them out.

The next step after this is post-processing in a more robust image processing program, like GIMP or Photoshop.  I will cover that in a later tutorial.

A Super-Duper Primer of Astrophotography Part 5 - Calibration Frames

Before you stack your images in DeepSkyStacker, you will want to have some calibration images to get the most out of your hard-earned light frames.  Here is what you'll need, and how to get them.

Darks

What's a dark frame?


Dark frames help remove that noise caused by ambient heat.  Cameras are really a detector that converts the energy of light into electrons, which your camera displays in an image as light.  The pixels in the camera chip can also be caused to fire by ambient heat providing enough energy to trigger the pixel and release some electrons.  This is thermal noise.  The hotter it is outside (or the hotter your battery and sensor chip get), the higher the noise.  It's also random - it can occur to any pixel at any time.  The longer your exposure time, the more time there is to collect this noise, and the higher the ISO, the more likely you are to see this noise.  (It should be noted here that taking longer images will ultimately get you less noise than taking many shorter ones - this is due to read noise.  See the Biases section of this post for more on that.)  It's harder to see the effect in a compressed JPEG than in the original RAW file, but this should give you some idea.

This is a 7-minute long dark frame taken at ISO-1600 when it was 80 degrees outside.

Basically, what having dark frames does for you is to help reduce both thermal noise and "hot" pixels (pixels that always fire, even when there's no incident signal).  Since noise is random, you can't perfectly subtract it, but giving dark frames to DSS tells the stacking algorithm allows it to "subtract" an average of this noise.

How to collect dark frames

Darks need to be at the same temperature, exposure time, and ISO as your light frames.  This means that if you take 30s photos at ISO-3200 and it's 65 degrees F, then you need to take your darks at 30s, ISO-3200, and within a few degrees of 65 degrees.  And, of course, it needs to be dark - light can enter in through the viewfinder and leak around the lenscap, so be sure to cover your camera with a towel and only shoot darks at night.  Generally, 20 dark frames is good enough for a good average, but some people use as many as 50 or 60.  You want a minimum of 10 or so.

Back when I only took 20-30s images, I would just take my camera off the telescope, put the body cover on, throw a towel over it, and use my remote shutter to take all of my darks while we were packing up.  But now that I take 5+ minute images, this is impractical.  So I bought a little digital temperature probe on Amazon that plugs into USB, and I record the temperature every 5 minutes while I'm out imaging.  Then, on nights when I'm not out at the observatory, I put my camera and the temperature probe on the back porch, and using a sequence I made in BackyardNikon, I take a variety of exposure times and ISOs throughout the course of the night.  The next day, I shuffle these away into folders in my "Dark Archive," one for every 2 degrees F (based on the temperature & time recorded by the temperature probe, matched with the time the image was taken), and then subfolders for every exposure time/ISO combination I usually take lights with.  I have over 6,700 dark frames saved just for my Nikon D5300, spanning 24-80 degrees F, 30 seconds to 7 minutes, ISO-1600 to ISO-6400.  I've been working on it for months.  And every camera is unique - if you get a new DSLR, you will need all-new dark frames!

Biases

What are bias frames?

Bias/Offset frames record the "read" noise of the camera chip.  The simple act of the camera's processor reading off the intensity of the light recorded in each pixel introduces electrical noise, which shows up in the image.  It looks similar to thermal noise, but is much less intense.  However, it tends to come in bands, and tends to be worse toward the bottom of the chip (also where the thermal noise is worse - it's closer to the battery and the camera processor).  

How to collect bias frames

These ones are easy - set your camera's exposure time to its very shortest available value (usually 1/4000th or 1/8000th of a second), and then jam on the shutter button until you have about 20-30.  These do need to be at the same temperature and ISO as your lights, so if you take your lights at ISO-3200 and it's 40 degrees F out, then your biases need to be taken at ISO-3200 and about the same temperature.  Because these are quick and easy to take, I don't keep a library of them - I just (try to) remember to take them when I'm packing up at the end of the night (or when I change targets).  

Flats

What are flats?

First, see my post about vignetting here.  Flats do two things for you - they capture information on the vignette profile of your telescope, and capture the dust you probably have on your corrector plate, mirrors and/or objectives, and any other pieces of glass in your optics train (to include your camera's chip).  They are not temperature-dependent, but are ISO-dependent, and very, very dependent on the orientation of your camera with respect to your telescope, as well as the configuration of your telescope.  I have different sets of flats for my C11 with a focal reducer, without one, with the Skyglow filter, without it, and different flats for each telescope I use that camera with, as well as for each camera.

How to collect flat frames

These ones require a little effort, but once you get the hang of it, they're not too bad.  First of all, you will either need to have your camera in the same orientation every time, or take a new set of flats every time you image.  Some people do it that way, but instead of the extra work, I just drew a line down all of my attaching components to my telescope with a silver Sharpie, and I line everything up every time I connect my camera to the telescope.  

Next, you need a white light source.  There are a few options:
  • For small-aperture telescopes, a bright white spotlight will work (I wouldn't recommend using this when there are other people on the observing field!).  Then, lay a white t-shirt and stretch it tight over your telescope objective.
  • Some people have LED tracing tablets to get a nice flat white.
  • I've had the most success with collecting my flats during the day - I stretch a white t-shirt over the top of my telescope (and hold it in place with my dew heater strip), and then aim the telescope toward the sky, pointing the opposite way of the Sun (both to protect it from the sun, and to get an even light distribution).
Then, you'll need to select an exposure time that puts the histogram in the center.  Most DSLRs have some way for you to view the histogram of an image you just took.  On my D5300, I press the Up key.  On my D3100, I have to go through a few menu options in the Edit section to see it.  Consult your manual.  Here's an example histogram:
On my C11 with the f/6.3 focal reducer and the Orion Skyglow filter at ISO-3200 in daylight with a towel over the top, the shutter speed that worked as 1/1250s.  Other flats of mine run as slow as 1/30s.  It depends on the telescope, ISO, other optics, camera sensitivity, brightness of the light source, thickness of the white t-shirt...so just check the histogram.  And take 20-30 of them.  It is helpful to have the telescope in focus (like from the night before) so that you can see all of your dust spots as well.

The tint of your flat frames isn't important - mine generally come out blue either because of the light pollution filters I use, or because I take them in daylight.  But DeepSkyStacker processes the flats in monochrome, so worry not.

What about "Dark Flat Frames?"

I've never used them, and the DeepSkyStacker FAQ doesn't have much to say on them.  I think you either use darks or dark flats.  Personally it's easier to take my darks when the camera is not attached to the telescope, so I'd just stick with darks.


Spend some time on your calibration frames - it will be worth your while!


Friday, July 7, 2017

A Super-Duper Primer of Astrophotography Part 4 - Image Acquisition

So you've got your camera attached to the telescope.  Now what?
First, let's talk about hitting that shutter button.

Closing the Shutter

Most DSLRs I know of have a built-in exposure time maximum of 30 seconds.  This is a good place to start.  However, you will quickly discover that the act of hitting the button causes your telescope to vibrate quite a lot, which will show up in your images.  Some manufacturers and models have a mirror-lock mode, which helps, but alas, none of the low-to-mid-range Nikons I've used do, so if yours doesn't, you'll need some options.  Also, you will eventually want to take images longer than 30 seconds.

Remote Shutter

I started out with a wireless remote shutter, something I still use frequently for DSLR selfies and grab-and-go widefield astrophotography (aka, putting the camera on a tripod).  It allowed me to hit the shutter button from a distance and not touch the camera, which kept the vibration to a minimum.
Pros: Less vibration from your finger
Cons: You're responsible for remembering to hit it every 30 seconds for hours on end.

Intervalometer

While my Nikon D3100 did not support the use of an intervalometer, my later purchase of a D5300 did (which I got solely because I needed greater control over bulb mode and other camera functions from a computer).  An intervalometer is basically a little programmable plug-in remote that triggers the camera at intervals you set.  I got one like this - although note that different manufacturers (Canon, Nikon, etc) will have different connectors, so make sure you get one for your camera brand.  You can set it to any time, even up to hours, for the exposure time, set a delay (I usually do 5-10 seconds delay to let the telescope vibrate itself still after I let go of it), set a pause between frames (a few seconds to allow the giant RAW image to save to memory), and a number of frames.
Pros: Automation, no computer required.  Batteries last forever if you don't use the backlight.
Cons: Dangles from the camera, can only set one exposure length at a time

Computer

One of the best computer purchases I have made is my Microsoft Surface 3 tablet.  It's small, powerful, has a very long battery life, has a full-size USB port, and charges via micro-USB (meaning I can charge it from a lithium-ion battery out on the observing field when there's no AC wall power).  I now use it to control all of my equipment - camera, guide camera, telescope, and temperature probe (more on all these things later).  I have a four-port USB hub to plug everything into.  I started with using digiCamControl, a piece of freeware that controls many kinds of DSLRs via USB cable, and looks nice to boot (if a little buggy sometimes).  (A quick note here: the Nikon D3100, since it's an entry-level camera, does not have a released SDK from Nikon, which in short means that there is no program out there that can control its Bulb mode. Believe me, I've looked!  This is why I upgraded to the Nikon D5300).  I later paid $50 for BackyardNikon (there's a Canon version called BackyardEOS), which gives me a great deal of control over the camera, lets me use Live View on my tablet screen, I can program a sequence of images (great for taking dark frames all night - more on that later), and much more.  
Pros: Much more control over camera functions and your telescope
Cons: Laptops can be cumbersome in the field, and non-tablet laptops have short battery lives and are more susceptible to the effects of dew, heat, cold, etc.

Exposure Time, ISO, White Balance...

If you're new to DSLR photography, all of the available settings may be overwhelming.  It can be helpful to learn how to use a DSLR in daytime photography first so that you get a feeling for what all of the settings do without wasting precious clear night hours.  But let me give you a breakdown of the settings.
  • Exposure Time/Shutter Speed: This is how long the camera opens the shutter.  On my Nikon D3100 & D5300, this runs from 1/4000th of a second to 30 seconds, plus Bulb mode (aka, press the button and hold open as long as you want).  Shorter exposure times collect less light, longer exposure times collect more light.  When doing astrophotography, it's a balance between getting enough light to see your object, but not so much that your background light is saturating your image.  I'll explain what a histogram is in another post, but basically you want all of your RGB peaks to be within the histogram window, and not cut off on either side.  Having a light pollution filter and choosing your ISO setting wisely can help with this.  Exposure times will also be limited by how long your telescope mount can track for.  If you consistently get periodic error (more on that later too) in your images (the stars are streaking), then you will need to use shorter exposure times - until you get the equipment needed to guide.  (More on that later too!)  On my Celestron NexStar alt-az mount, that limit was about 25 seconds.  On my Celestron CGE, that was 30 seconds, until I got the ability to guide, which raised it to 5 minutes.  Many astrophotographers on AstroBin use 1-10 minute subframes for color images.
  • ISO: This is a term carried over from the days of film, and it's an indicator of sensitivity.  On a DSLR, it's an indicator of gain, but the result is similar.  My Nikon D5300 runs from 100-12800.  Higher ISO = greater sensitivity, but also greater noise.  For a long time, I was shooting with ISO-3200 to try and get more light from my deep sky objects (DSOs), but I was recently advised by a professional in my club that I should drop by ISO to no more than 1600 so that my printed images could be printed at 300 dpi and not suffer from too many noise artifacts.  So I have dropped to 1600.  But for 30-second subframes, you may want to go ahead and use 3200 anyway.  
  • White Balance: When in different lighting situations, such as in the sun or under a fluorescent light, our brains automatically compensate for the difference in the spectrum of colors being emitted by that light source.  Think about walking into a school gym - at first, everything might look pink or orange, but then it starts to look normal after a few minutes.  Cameras compensate by adjusting their white balance - the emphasis on different parts of the color spectrum when it captures and records the image.  Your camera may have some pre-set settings, like "Daylight," "Shade," "Fluorescent," etc.  This is a setting that many astrophotographers will tweak and play with, and it's adjustable after the fact to, in programs like Photoshop, especially if you took raw images.  But I (and other AP-ers) have found that Daylight works quite well to give a more "natural" color balance to your astronomical objects.  Just make sure you take it off of Auto mode, or else each frame may have a different white balance, which could make things noisier in your final image.
  • Focal Ratio or f/stop: When your camera is plugged into your telescope, the telescope basically becomes a giant lens, and its f-ratio is not adjustable (see this blog entry for more on focal ratio).  When a lens is attached to your camera, generally you can adjust the focal ratio, which basically steps down your aperture, in a way.  In short, a lower f-ratio (say, f/2) gathers more light in a shorter time than a higher f-ratio (say, f/10).

Data Management

Backups, backups, backups!

I cannot emphasize this enough.  Even when I'm acquiring images, I have it save to both my computer and my camera's memory card.  I upload my data as soon as I can when I get home to my main computer, and then I backup my entire Astrophotography hard drive to two other drives - one internal, and one external.  I cannot imagine how devastated I would feel if my hard drive crashed and I lost all those hours of hard work.  I keep the external backup drive in a fireproof and waterproof safe.  (This is serious business.)

Shoot in the raw.

Always set your camera to take RAW images for astrophotography.  It is an uncompressed format that preserves every pixel's worth of data, plus much more (you can adjust color temperature, exposure, and more in Photoshop and get back details even of washed-out or underexposed parts of a picture).  Get yourself a big hard drive though - these files are as big as the number of megapixels on your camera (for my D5300, these files are 25 MB in size apiece for the 24 MP that camera has - and it adds up fast!).

Organize your files.

Not only will you need your image files for processing, but also darks, flats, and biases, plus a folder for your final images (more on calibration images later).  Here's my folder structure:
Astrophogoraphy drive
-> Stacked Images
     -> Target Name (ex: M42 Orion Nebula)
          -> Attempt # (ex: Orion_5)
               -> Image type folders (lights, darks, biases, flats, finals)
My final images are named first my object, then attempt, then version out of the stacking program, then version out of the post-processing program.  For example, Orion_5_1_2 would be my 5th attempt at the Orion Nebula, first version I saved out of DeepSkyStacker, and the second I saved out of Photoshop.  This way, I can easily track back to what the camera settings, telescope configuration, etc were for that image, should a copy wind up in another folder (like the one I keep on my Dropbox to show off to people).

Record your settings and make a log.

I am a scientist, so writing down details of my work is very important.  In every Finals folder for every attempt on every target, I have a standardized text file that includes all of the information about how the image was acquired.  Here is an example:
I realized later the typo in the year.  Or am I just living in the future???
#TooLazyToFixIt

Now, this doesn't capture all the settings I use in DSS or Photoshop, unfortunately - there are too many things to list.  But getting the configuration, number of subframes, ISO, temperature, etc. is important, and is what AstroBin asks for when uploading photos.

In addition to these technical notes, I also have kept a log since Day 1 of owning a telescope, for which I am eternally grateful.  Some entries are more detailed than others (as you'll discover by reading them on this blog), but not only is it neat to go back and look at how I used to do things and what I used to not know, but it's a very useful tool for cross-referencing data and getting a qualitative glimpse at weather conditions, telescope performance, etc, that affects my images.  It's also fun to re-live the moments I first saw or captured something amazing, like the first time I imaged the Orion Nebula, or the first time I looked at Saturn.  Many visual observers keep logs of what they have observed and sketches and notes about the object - astrophotographers should too.