Welcome to QHY imaging under Linux.  


This software GUI (Graphic User Interface) was started by Dan Holler and expanded by Clive Rogers and enhanced with code by Giampiero Spezzano for use of the drivers written for the QHY2,6 and 8 cameras by Tom Van den Neede of  http://www.astrosoft.be.  Also thanks should be made to Geoff Hauser for his great efforts in writing the QHY5 (it is unknown if this driver works with the colour version) driver for Linux.  The QHY5 is now also supported by Qhyimager saving 8 bit fit files instead of the ppm file format that Geoff used.  

By using this software you agree that you accept any and all  responsibility and you use it at your own risk.  The Linux distributions this GUI has been tested on are Ubuntu/Kubuntu/Xubuntu 7.04,  8.04,  9.04, 9.10, 10.04 and SuSE 11.0

The QHY camera drivers can be downloaded from http://www.astrosoft.be
At present only the QHY2,  QHY5,  QHY6 and QHY8 cameras are supported under linux but this may change.

Software needed to run these cameras.
fxload  Upload driver to the camera.
Libusb to talk to the USB cameras. 

GraphicsMagick  was used to convert from fits format to png/tiff so that this software can display the image on screen.  This has now changed depening on what version you are now running.  The later versions do not need GraphicsMagick.

All the files you need now should be included within the .deb or .rpm or tar.gz
The Deb file was converted to rpm file using the package Alien.

Navigating around the program while it is running.
Here is a screen shot of the program and some explanations of what the buttons and drop down menus do.

Fig01

Fig01 first screen.


Most of the setting here are self explanatory  but just in case the interface clear enough here are brief descriptions.  This file is also with the program under the help button.

Setting button at the top left will take you in to the settings tab for the camera,  file and folder naming plus time lapse which will be explained a little later.

Offset [0-255] default: 115
Here you can either set the number directly in the box or use the slider control.  If you click the slider control on either side of the slider then the slider will slide towards the mouse click 10 digits.

Gain [0-100] default: 50
Here again you can set the number in the box directly or use the slider control.  Same control here for the slider as for Offset.

Focus/Preview Mode.
This has 2 meanings.  Click the checkbox,  set the Exposure time from the drop down menu.  Push the Start Button.  This will display an image on the right hand side of the screen while you focus the telescope or camera lens.  When finished focusing uncheck the checkbox to start imaging.

Zoom.
Zoom is exactly like it says.  You can zoom in up to 400 times to help focusing.  Just click on the area you want to zoom into then use the scroll wheel on the mouse to zoom in and out. 

Zoom Browse.
This option will only show itself once you are in zoom mode.  This is like a fast magnifying lens. 

Exposure Length [0-900] seconds.
Drop down menu to set the time length for each exposure.

Number of Exposures [1-100]
Use the drop down menu to set the number of frames you want to capture.

Frames Captured.
This just tells you how many frames you have saved onto your hard drive.

Start.
This is the Start the capture/focus button.   If you push this button a second time while capturing then the imaging will stop.  During long exposures though this might take a while to action.

Pause.
This is for when you want to pause the capturing or focusing if clouds come into view or something else happens and you don't want to stop the capture routine.
When focusing you may notice a short delay or imaging you may notice a short/long delay depending on the time of the exposures before the program answers the push of the Pause button.  I have tried to make this a sensitive as possible but the way the drivers have been written stop me from making it answer immediately.
More on this at the end of these pages.

Just below the pause is a box showing you how many seconds are left to run on each frame being captured.

Messages will appear in the middle of the screen on the right.
Enter Filename,  Enter Folder Name. When either of these 2 messages appear you have not set the folder and filename for saving.  You can find these under the Setting/Filename as of Fig03 shown later.
No Camera detected.  Initialising 3 Seconds.   This means you have not plugged in the camera or the computer can no longer see the camera.   Fix is under Setting/Camera Fig02 

Main picture will show captured frames. 
Frame counter is shown in the top left hand corner of the image screen and will not be saved on the actual image frames.

Use the right mouse click menus:-

Show frame #  Disable.

Auto stretch ADU Enable.   

The Information icon Icon is the information dialog box to help you get the best out of this program.

Fig02

Camera settings.

Screen Controls.

On Screen Reticle.
This is a reticle that is put on screen to help you compose the object your imaging.

Show frame #.
Put the frame number on screen in the top left corner.

Fit Image To Screen.
Fits the last captured image to the present screen size.  This will not affect captured frame as its only for the screen.

Center crop.
Crops screen image to centre of the sensor only. This speeds up frame rate a little and will not affect the saved frames.

Histogram.
Display the Histogram of the image on screen.

Auto Stretch the ADU.
Auto stretch the images signal.

Debayer.
This will only work for the QHY2 and QHY8 at present.

Mask.
Choose which matrix you wish to use to suite your cameras debayer matirix.

Show color.
Choose whether to show colour in the captured image but only for the colour cameras at present supported.

Invert screen.
Invert the screen colours of your image.

Show FIT  header.
Show the header data of the captured image.

Save crop to BMP.
Saved cropped image as a BMP image.

Save full image to BMP.
Save the image on screen as a BMP image.


Under the Settings/Camera tab you have the camera setting.

Fig03.




Camera Image/Control Fig03.

QHY Camera          
This is the camera the program has either detected that is plugged in or you can choose the camera by using the "Full List" and then choosing the camera from the drop down menu.

Binning Mode
Binning mode [1|2] default:1  Use 1 for normal operation and 2 if you want to X2 bin.  X2 bin  quarters the size of your image as it uses 4 pixels as 1 pixel making it very sensitive.  Some people use mode X1 for the detailed luminance images and X2 bin for the colour data using coloured filters.

Hot CCD/Full List.                                                                                      
This is where you should see the QHY camera that the program has detected.  If the program has not detected your camera then click the Hot CCD button and it will change to the Full List.  The drop down menu will now show the QHY cameras that the program will support.   

Refresh.                                                                                                                              
This reloads the list of newly connected camera.

Reset.
This requires a sudo password to reset the camera.  Unplugging the camera and then replugging the camera will do the exact same job.

Download Speed
Readout speed [0|1, default:0 = slow] Use 0 for long exposure images and 1 for short exposures.  This  setting has no effect in focus mode.

Mod S/D
Image exposure mode [1|2] default:1=single exposure .  Use 1 for short exposures and 2 for the longer exposures.  2 will double your timed exposures as it takes 2 images to try and get rid of the interlace lines that sometimes show up.

Amp Control 
Amplifier control [0|1|2] default:2=auto.   Use 0 for short exposures and 1 for longer exposures.

Speed Capture.
This option will show 1 frame in 10 but all images are saved.

Crop Image.  
This removes the overscan area of each image being captured.

Save Debayered.
Save Debayered Image for the QHY2 and QHY8.  Not used in the QHY6.

Colour Scheme.
Allows you to turn the screen colours to day,  night or system colours.

Auto start up in focus mode.
This allows you to start the program to recognise the first camera it finds and start imaging in focus mode.

Clean up unused profiles on exit.
The profiles that you mostly use can be loaded and saved.  If you load your favourites so they show in the User Profiles Settings and tick the box unused profiles will be deleted.

Save status on exit.
Save the state of the program and it will start up in this same state next time the program is started.



Filename Tab.

Fig 04.

 Here you can manually add the folder name like /home/user-name/folder-to-store-in/  Note you must add the trailing "/" without quotes.  Now enter a descriptive  name like NGC5432 or M101 etc.  Or you can use the "Save Image As" button which will open as Save As dialog box for you.  If you have not already created a folder/directory then you can do so with the Save Image As button along with the filename.

Use Audela Naming Convention.
I have not used Iris but I have included a naming convention here for your use.   This will  automatically recognise the user and add the users home directory  ie: /home/john/todaysdate/image_todaysdate_001.fit with the 001 incrementing by one with the next captured image.

Auto Clear Filename.
If you want to clear the filename completely after the capture sequence has finished then put a tick in this check box.

Filters.
Look at the end of the Filename edit box.  Here you have Filters.  This is nothing more than RGB letters to add to the end of the filename so that when it comes time to stack/combine your images you will know which images were captured with the L filter,  which images were captured with the R filter and so on.  

NB.....It does not change the filter on a filter wheel for you.

Add Date To Filename.
This feature was added because I always add the date to my images.  This way I know when I took my images with a quick glance.
Example of  Filename and Date :  M101_2009-06-08_001L.fit

Add Date To Filename.
Timing for images is very important so here I have added the time to the end of the Filename and Date field.
Example of  Filename and Time : M101_20:26:09_001L.fit
Example of Filename,  Date and Time  : M101_2009-06-08_13.02.30_001.fit

Captured grid: 
Captured file list. List can saved / loaded. Through this previous frames can be reviewed after capture end.

Auto Save:
This option auto saves a text file with all the data from the fits header in the same location as the images being saved.

Load frames in a new window:
This is exactly what it says.  It will load the selected file in another window.

Frm Load button: 
Loads selected frame. Frame will be loaded, it's sequence number will be shown for easy compare.

Clear button: 
Delete all rows in grid.

Import button:
Import data-set from previously saved capture lists. Once imported frames (not moved or deleted) can be open for deeper analysis.

Export button: 
Export data-set to save the capture list for future use.

On the next tab Fig05 we have Time Lapse.
This was added because of capturing when your not about or you want to automate some of the capture.
Putting a tick in the Time Lapse box allows you to change the setting for the Start time and End time of your time lapse imaging session.
If any of the times you enter from the drop down menus have already passed then you will be informed when you try to run the imaging session.
Next you can set the  pause interval between the capturing images up to 1 full day.  The time here is entered in seconds.

The pause interval is operational even when the Time Lapse check box is not ticked so it can be used for normal time lapse like Lunar,  Solar eclipse or transits of Jupiters/Saturns moons etc caputre without setting the Time Lapse Year, Month, Day,  Hours,  Minutes and Seconds.

Fig05.




Fits Header Tab controls Fig06.

Edit fits header: enables the custom fits header key / values edit.
 Grid header: key / values / enable switch. Enabled rows will be inserted in header (edit enabled). Grid has right mouse button menu for  quick row edit and data save / load .  Edit fits header must be enabled for the right mouse button menu.
 Add button: Add a new row, hold <Shift> for insert.
 Remove button: Remove selected row, <Shift> remove all rows.
 Restore button: Restore a default set of data.
 Import button: Loads a data-set previously saved.
 Export button: Saves a data-set to external text file for later use.

Notice: Regardless of the Edit fits header switch value, these key / values will be added to the saved frames:
 SWCREATE= 'qhyImager' + version infos
 DATE-OBS= UTC Date the file was written
 TIMESYS = Time system used (UTC)
 EXPTIME = Total integration time in second(s)
 FRAMENO = Frame sequence number

Fig06.

A couple of things to note.  


You have to manually close this window by pushing the Open/Close Setting Button.  This has been done so that during imaging, changes can be made on the fly. In other words you don't have to stop imaging to make changes to the settings.

Second meaning of the Focus/Preview box.
Once you have set up the Folder name and the Filename under the Settings button you can now start imaging using the settings you entered.
But....
During your imaging session you may notice that the focus has gone out a little which all telescopes/CCD cameras seem to do over a period of time.  Instead of stopping imaging just tick the Focus/Preview Mode box.  The program will stop capturing images and go into focus mode.  When your happy with the focus again just un-tick the Focus/Preview Mode box and the program will continue where it left off.

While focusing or imaging as stated earlier you will sometimes notice a long delay ie:  If your capturing 30 images of 300 (5 minutes) seconds each then when you push the Pause button it could be up to 5 minutes before the program responds.  I would like to add at this point this is not a fault of the program but its the way the drivers have been written.  Try this and you will see what I mean.

Start the command line Bash/Shell Konsole.   Now enter /usr/local/bin/qhy(camera number)image -a2 -s1 -t300 -g20 -f /home/username/imagefolder/test_01.fit
Here is what the numbers mean.  
-a2 is the amp auto setting.
-s1 is the fast download speed from the camera.  
-t300 this is 300 second or 5 minute image.
-g20 is the gain of 20 and finally -f is the folder and filename of where and what to call the image on the hard drive.

Notice after you press the Enter key to make the camera start imaging the cursor does not come back until the image has been saved to the harddrive in this case a full 5 minutes.  

I have been in contact with the writer of these drivers and he is talking to Mr. Qiu in China about trying to open up these drivers.  If  he is successful then this program maybe changed to that end.

One last thing.
You use this program entirely at your own risk.  No responsibility will be accepted for any damage you incur using this program.

The drivers in .deb, .rpm and .tgz formats only needed if you intend to use the commnand line or write your own wrapper.
You can download the drvers with the following link,  at present only the QHY2 ,  QHY5,  QHY6 and QHY8

The Qhyimager program .deb,  .rpm and .tgz includes all the drivers and udev rules so that your camera is recognised as soon as you plug in the camera.  You do not need to download any of the qhy*tools drivers.  You can download the qhyimager binary here.

If you find that your QHY5 camera will not light up then its possible that you have one of the other dealer variants of this camera and the VID/PID is different from the QHYs.   I believe the answer lay in changing the detected VID/PID in the /etc/udev/rules.d/85-qhy.rules and in the /usr/local/bin/qhy5reset.
After checking your VID/PID with lsusb you should see something like this:-

Bus 001 Device 001: ID 1618:0901
This is the standard QHY5 as you can see in the next 3 lines from the /etc/udev/rules.d/85-qhy.rules

ATTRS{idVendor}=="1618", ATTRS{idProduct}=="0901", RUN+="/sbin/fxload -t fx2 -I /etc/qhyccd/qhy5loader.hex -D $env{DEVNAME}"
SYSFS{idVendor}=="1618", SYSFS{idProduct}=="0901", RUN+="/bin/sleep 5"
ATTRS{idVendor}=="1618", ATTRS{idProduct}=="0901", RUN+="/sbin/fxload -t fx2 -I /etc/qhyccd/qhy5.hex -D $env{DEVNAME}"

If your number is the ALCCD5 like this Bus 001 Device 001: ID 16c0:081a then change the 1618 to the first number you see from the lsusb command and then change the 0901 for the second number like this:-

ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="081a", RUN+="/sbin/fxload -t fx2 -I /etc/qhyccd/qhy5loader.hex -D $env{DEVNAME}"
SYSFS{idVendor}=="16c0", SYSFS{idProduct}=="081a", RUN+="/bin/sleep 5"
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="081a", RUN+="/sbin/fxload -t fx2 -I /etc/qhyccd/qhy5.hex -D $env{DEVNAME}"

When done save this file into its original place.  Now load the /usr/local/bin/qhy5reset into your favourite text editor and locate these lines.

# see if there is a QHY5 unconfigured device to be found bd=$( lsusb | grep 1618:0901 | cut -d ' ' -f 2,4 | sed -e 's/ /\//' -e 's/://' ) dev="$bdir/$bd"

Now change the 1618:0901 to your numbers.
# see if there is a QHY5 unconfigured device to be found bd=$( lsusb | grep 16c0:081a | cut -d ' ' -f 2,4 | sed -e 's/ /\//' -e 's/://' ) dev="$bdir/$bd"

After saving these files you should have the light on the back of your QHY5 light up and now be able to auto load the firmware needed to run the camera.
Some Linux version allow the udev rule to be auto run others require a reset.

Please do consider joining us on the QHY forum here:
http://qhyccd.com/ccdbbs/index.php