Zeroing In

Last night was a nice transparent night, the moon about a day from full.  Jupiter hovered an inch from the Moon’s head.  A good night for fooling with the system.

My polar alignment should be pretty good, but the scope still doesn’t know where it’s pointing.  My Meade finder scope often has a mind of its own and can be off enough that the target is not even close to being on the camera’s chip.  The coverage of the chip is only 17 x 11.5 arc minutes so it can be painful to locate an object with the camera. Once you find it, and sync the mount, you’re good until you crash into the counterweights with your head and knock everything out of alignment, or make changes to polar alignment, or rebalance equipment, etc. Usually I take off the camera, put in an eyepiece, find the thing I’m looking for, put the camera back on, center the image, and re-sync.  PEMPro has a “Find Star” feature that takes images in a spiral around the current position, and when it hits the target, you can right-click the frame and it will center it so you can sync properly.  I’d thought I’d give that a try.  I will say that it worked like a charm, except I was so far from the target that I grew weary of waiting.  Also, as PEMPro accumulated images — its default limit is 100 — my fairly ancient PC began to act like it was choking with low memory.  I also had trouble connecting remotely, and eventually had to kill PEMPro with the task manager.  So I disconnected the camera, installed an eyepiece, centered Vega, reconnected and centered Vega on the chip, re-synced the mount, recentered the finder, and was back to normal.

I used the TheSky to go to the double-double, centered on one of the pair on the chip, then a look at M57, which centered up perfectly.  Probably won’t stay perfect since the 12″ mirror has a bit of play that will show up as we slew around the sky.  I made a 300 second uncalibrated luminance image just to get an idea where we stand.


M57, uncalibrated, unguided, Meade 12″ at f/10, 300 seconds luminance; ST-10.  Fair transparency, bright moon light.

The oval stars  show there’s a bit of tracking error in RA, which could be periodic error, and I’ll get into PEMPro to see if I can improve that, next full moon.  I would like to, and believe I can, do 5 minutes unguided.  But anyway, that error will certainly guide out. Getting the guiding cleaned up is next, along with auto-focus.  I have been using the guide chip on the ST10, but want to set up the new Orion SSAG autoguider, which I think will work better for narrow band imaging.  The focus is also off, and I will get the auto-focus routine down.  I get fairly good focus manually using a mask, but auto-focus will probably do better than I can, and for remoting, auto-focus absolutely has to work.  Also, there’s vignetting and dust donuts which will disappear with a flat field.  I need a good, repeatable flat-fielding method.  I have a white target set up in the hut I have used successfully and wonder if it would work if placed in the Park 1 target zone.

Figuring out the AP-1200

I installed a Astrophysics AP1200 mount in my roll-off roof hut, now actually more than a year ago. It’s intended for remote imaging from the comfort of my living room, and if I can get it to work from my living room to the Hut, it “should” work from living room to New Mexico. I think I’ve been afraid to really get the system figured out because honestly it can perform far beyond my current level. I have an otherwise cobbled together set up that has worked fairly well, but now I’ve had to put together the pieces and parts to really make it work. So there’s a lot of learning that has to happen. I finally acquired Maxim DL in May, and I believe that TheSky 6, Maxim DL, my SBIG ST-10 and the AP-1200 will all play together nicely in the hut and via remote.

We’re in the back half of November, and it should be getting cold, but we’ve had unusually warm weather, and the new moon will be growing over the coming nights. This is a great time to try to iron out the inevitable weirdnesses of the new system. I’d really like to be remoting to the system from the living room this winter!

Should be simple if it’s broken into simple pieces. Software (TheSky, Maxim, PEMPro) needs to communicate happily with hardware (AP1200, ST10 and CFW8, Optec focuser, Orion SSAG).  I’m gonna make this thing happen!

Suddenly nothing is working right! I slew the scope and the PC reboots itself! This turns out to be a loose serial port connector on the focuser. I connect theSky to the scope, but Maxim is unable to connect. So I downloaded and installed the latest ASCOM TeleApi plugin (from and the latest AstroPhysics V2 ASCOM drivers (from Now I can connect theSky, Maxim, PEMPro to the AP1200. I’ve been setting the Autostart feature of the AP1200 to “No” and using the keypad for initialization. When I park (“Park 1”) the mount is on the wrong (East) side! Jeesh! Now what? There are a variety of weird behaviors I’m getting starting up with the keypad, connecting to the PC, and parking with the keypad.

I poked around in the AP-GTO user group on Yahoo, and of course I’m not the first to  have these issues. First I discovered that I hadn’t adjusted the keypad yet for the end of Daylight Savings Time. That’s what causes the east-side-park thing. I have a permanent setup and am using a PC, so I should be setting Autostart= EXT and initialize via the theSky. I’m only creating another opportunity for confusion with Autostart=NO; it only makes sense for portable setups. So I set the keypad to EXT and restart the mount. Resuming from Park in theSky, the map shows the scope in the park position, but when I try a go-to, it takes off in a totally inappropriate direction. The mount has no idea where it’s pointed. Ok, I have set my location to an East longitude when it should be West! That should make a difference! I sync to Vega, and slew to Epsilon, but it still is wildly lost. Oh, in the AP V2 ASCOM control panel, is a “convert Sync to RCAL” check box which is checked by default. So I wasn’t really syncing to Vega at all! So I uncheck that, agree with the dire warning alerts that pop up, and really sync. And, after a park-disconnect-reconnect cycle or two, we seem to be in the ballpark. In the process, I see that the AP V2 control panel, which is entirely new to me, is really excellent. It’s very comparable to the keypad but with easier layout of controls, so why haven’t I been using it all along…. Also the help materials with it are really good.

My polar alignment was decent, having spent an evening doing drift alignment when I first set up the mount. In the interim, the Great Johnsville Sewer Project caused a surprisingly large 20 foot deep trench to be dug about fifteen feet from the Hut. As a result my pier, which is not as massive as it should be, began to lean like the tower in Pisa. Now that the trench has stabilized, I think/hope the pier will stay put, but I did have to level up the adapter plate for the mount. So I was looking forward to using PEMPro’s Polar Alignment Wizard to repair and verify the alignment.

Sunday night was clear with that milky sky that comes from ice in the air, and an 8 day moon. I fired up the scope and camera, Opened PEMPro and Maxim, and connected the scope and camera. PEMPro is great for this combination of hardware and software. I went thru the handy checklist, collected site info from the mount with the click of a button, and following the wizard, it measured my image scale, about .46 arc seconds/pixel, and established the cardinal directions for the chip. The software prompts you to slew to the South for azimuth measurements, just click “slew” and it goes to a good place. Actually, when I began the azimuth measurement routine, PEMPro had trouble finding a star; when I looked at Maxim, I could see that it was trying to lock on to a hot pixel. So back in PEMPro, there are handy jog controls to move the scope a bit to find a fresh field. After that it quickly found and analyzed a star. In retrospect, I should have used a dark subtraction, that would have prevented the problem.  I was able to get the azimuth to + or – .1 arc minutes in about 15 minutes of tweaking. The next screen I found confusing; you take a reference image and choose a star. PEMPro displays an arrow over the star and you are supposed to tweak the mount to move the star to the point of the arrow. My first set of tweaks was close enough that the star was at the tip of the arrow, and I didn’t understand what I was supposed to do. Apparently nothing! The altitude alignment went as smoothly, although I was getting cold and anxious to finish. I spent maybe an hour and a half on the alignment, and am well within an arc-minute of the pole. I’ll try it again to verify on another moon light night; I think it will go faster with practice. The AP mount has incredibly smooth adjustments for polar alignment. After many years of fooling with a Meade Super-wedge, I really appreciate the precision of the AP.

Use AppleScript to Manage PDFs


I often collect PDFs off the web, and save far too many of them.  But often they are tear sheets, product blurbs, or rocket science I don’t understand that I don’t want to have cluttering up the hard drive.  When I have finished with a PDF that I want to trash,  I use an AppleScript to immediately delete the file without leaving Acrobat.  The script is accessed from the Script menu in the Menu Bar, and immediately deletes the file.  The document is still open, but when you close it, it’s gone.

Here’s a simple script that may be useful  It works with Acrobat Pro and Acrobat X, but will not work with Acrobat Reader, because Reader is not “scriptable”.  It also can’t work with Preview, which is also not scriptable (!)

--this script will immediately delete the active Acrobat document
--these "--" things are comments
--use at your own risk, etc
--attribute to JJ McClintock 20121101

--initialize variable
set doc_path to ""

tell application "Adobe Acrobat Pro"

	--get the name & path of the active document
	set doc_path to get file alias of active doc as string
end tell
--a dialog confirms
display dialog "Are you sure you want to delete " & doc_path & " ?"
tell application "Finder"
	move file doc_path to trash
end tell

tell application "Adobe Acrobat Pro"

end tell

That’s the end of the script, not much to it.  It asks Acrobat what and where the file is, and then tells the Finder to trash it.

How to make it work?  Copy the script. Locate the AppleScript editor on your Mac – it’s in your Utilities folder, but it’s easiest to use Spotlight, CMD-Spacebar and type applescript editor.  Open the editor and paste the script.    Click the “Complile” button, which will format and check the script to make sure it doesn’t violate any obvious rules.  Save the file: select “Application”  in the “File Format” dropdown, name the file “Delete PDF” or whatever, and save it in a convenient location.  It’s going to wind up in your script menu, but the actual folder for your script menu is buried in the bowels of your home directory.  Here’s how to find it.

While in the editor, select Preferences from the AppleScript Editor menu and check the “Show Script menu in menu bar” box. Close the prefs window, you should see a scroll icon in the right part of the menu bar.

what the script menu looks like

Click the Script icon and you will see a bunch of Apple supplied scripts, I think, but at the top select “Open Scripts Folder|Open User Scripts Folder.  That’s a short way of getting to the scripts folder, which is located in Mac HD: Users:Your User name:Library:Scripts,  Since Apple has invisibilized the Library folder, you have to horse around to get to it.  Alternatively, from the Finder, select the Go menu while holding the Option key, and select Library.  Anyway if you place your new Delete PDF script in the user scripts folder, it’s available at all times from the scripts folder in the menu.

Hopefully you will find this to be a handy little gadget.  If you have several documents open, the script will delete the “front most” one. If you make a mistake, your file is still open and can be re-saved, and is in the Trash and can be recovered.

I have another handy script I use frequently to rename PDF documents.  How often do you collect a PDF with the helpful name “aa3695-05.pdf”?  If I want to keep it for reference I’d like to rename it something I can live with, like “Lucky Imaging-Hi Rez Imaging from the Ground.pdf”   Using the handy “Rename PDF” script, it’s easy.

--saves pdf with new name, deletes original pdf
--default save folder is Documents
--won't work if file doesn't exist on disk.  Why should it?
--won't work on secure documents. They wouldn't be secure.
--modified 20110526 to (awkwardly) handle long file names
--since acrobat's applescript implementation doesn't permit file names longer than 32 char,
--need to make temporary short file name for saving, which will be renamed with the chosen long file name
--cleaned up 20121101

--initialize some variables
set default_folder to (path to documents folder from user domain as string)
set doc_path to default_folder
set new_file to choose file name with prompt "Enter new file name" default location alias default_folder
set short_name to default_folder & "short_name.pdf"
set file_string to new_file as string
set text item delimiters to ":"
set file_string_list to every text item of file_string
set last_word to text item -1 of file_string

tell application "Adobe Acrobat Pro"
	set doc_path to get file alias of active doc as string
	set active_doc to name of active doc
	--try blocks help the script to fail gracefully if an error occurs
		save active doc to file short_name with replacing
		--save active doc to file short_file with replacing
	on error
		--biggest source of error is trying to rename a secured document
		display dialog "Save failed.  Is the document secured?  You can still rename using Save As or in the Finder." buttons {"Cancel"}
	end try
	close active doc
end tell

set path_string to quoted form of POSIX path of short_name
set shell_string to "cp " & path_string & " " & quoted form of POSIX path of new_file & ""
--shell script uses unix commands to do file tasks, in this case copy
do shell script shell_string
tell application "Adobe Acrobat Pro"
	open file new_file
end tell

tell application "Finder"
	--trash original file and the temporary "short_name" file
	move file doc_path to trash
	move file short_name to trash
end tell

--restore text item delimiters to default setting
set text item delimiters to ""

Prepare this script like you did the “Delete PDF” script before.  From Acrobat Pro or Acrobat X, if you want to rename a PDF file to something human readable, go to the script menu, select the “Rename PDF” script.  You’ll be prompted for a name and location for the file.  If for some reason Acrobat won’t let you rename the document, for example, it is secured, then you get an alert.  You should still be able to go to the Finder, and rename it the way you used to.