Giter Club home page Giter Club logo

ascom-camera-driver-1280scicam's Introduction

ASCOM camera driver for the 1280SciCam

Basic ASCOM camera driver for the near-infrared (SWIR) 1280SciCam InGaAs camera (Princeton Infrared Technologies (PIRT)) using the BitFlow Axion 1xE frame grabber and SDK.

Made for SPIRIT - SPeculoos InfraRed Imager for Transits.

Please refer to my PhD thesis and the SPIE proceedings where I used this camera for further details, specifically see Sect. 6.1.3 in my thesis for a description of how camera driver was designed our its function and use with 32 bit MaxIm DL and ACP.

By default, the 1280SciCam produced 1280ร—1024 14 bit images (in 16 bit files with this driver) at a frequency of 1/(frame time). The frame time was user-settable and defined as the time from the start of an exposure to frame read.

While the camera could be programmed to trigger single exposures on an external signal, this approach was found to increase read noise. This driver thus employed a continuous mode (where frames were produced immediately one after another) with a dynamic frame time set by the driver per exposure time, where the frame time was set to be the exposure time plus a 100 ms buffer. We did not optimise the buffer time duration, as it was negligible compared to our typical exposure times. However, we did observe that shorter buffer times occasionally introduced image banding artefacts, further investigation is needed to fully understand this and its effect on photometric quality.

See below for a screenshot of the camera in action with MaxIm DL on 1m class telescope at SPECULOOS-South, Paranal Observatory, Chile. Also shown, image of the Trapezium in Orion taken with the camera in the zYJ filter, and a transit of TRAPPIST-1b (also in the zYJ filter).

Collection of images

Resources/tips for developers

You will need Windows and Visual Studio (with .NET and C++ dependencies) to develop the ASCOM driver

The majority code of interest is in Driver.cs.

Please note, if you're not using ACP, you may want to get rid of the portion of code that deals with the slowness of ACP (if not included, ACP would hang):

// REMOVE FIRST IF NOT USING ACP
if (cameraImageReady && (DateTime.Now - exposureRequestedStart).TotalSeconds < 1.5)
...

Installation

At the moment, the driver was operated via the compiled version from Visual Studio. When I next have a camera in the lab, I would like to make an installer for the driver.

Python example code for testing the camera

Directly via ASCOM driver (access to all ASCOM commands)

from astropy.io import fits
import time
import win32com.client
import matplotlib.pyplot as plt

driver = "ASCOM.PIRT1280SciCam2.Camera"

# Connect to camera
camera = win32com.client.Dispatch(driver)
camera.connected = True

# Set exposure time and start exposure
exptime = 1
camera.StartExposure(exptime, True) # boolean bit for shutter, if it existed.

# Wait for image to be ready
while not camera.ImageReady:
    time.sleep(0.1)

# Get image
image = camera.ImageArray

# Save image (optional, add header information if needed)
hdu = fits.PrimaryHDU(image)
hdu.writeto('test.fits')

# Display image
plt.imshow(hdu.data, cmap='gray')
plt.colorbar()
plt.show()

Via Maxim DL (comes with headers from MaxIm DL, e.g. detector temperature, time of acquisition, etc.)

import win32com.client
import time

# Connect to camera
camera = win32com.client.Dispatch("MaxIm.CCDCamera")
camera.LinkEnabled = True

# Set exposure time and start exposure
exptime = 1
camera.Expose(exptime, 1, 0) # exposure time, exposure time, filter (if filter wheel set to 0 position)

# Wait for image to be ready
while not camera.ImageReady:
    time.sleep(0.1)

# Save image
camera.SaveImage('test.fits')

ascom-camera-driver-1280scicam's People

Contributors

ppp-one avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.