Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

  • Goal: inform acquisition of twilight sky flats and transition to observing with short exposure times

  • Objective: monitor sky brightness in ugrizy bands as a function of alt,az, and sun angle below the horizon.

Initial Design

This device has no lens. It is basically composed of a photodiode attached to an electrometer. The optics are baffles and iris to collimate the light to a fixed solid angle value. The alt-az mount provides an accurate pointing in the AltAz system. The filter wheel stores the 6 LSST filters, ugrizy.

image-20240813-160811.png

Optics Layout

This setup comprises a manual filter wheel, some thorlab parts for adjustment of the light beam, an optical bench with an Alt-Az mount on a Vixen bar.

image-20240813-162044.png

Parts List

Aug, 7, 2024

image-20240813-160608.png

The deliveries from Agena Astro did not arrive on time, we are still waiting (Aug 13)

Keysight Electrometer (B2983B) Connection Setup

Step-by-step for connection setup

  1. Connect a USB Type B on the back of the electrometer to the laptop

  2. The USB cable is connected to a USB hub that goes into the USB-C power entry of the laptop. This step is needed because the laptop does not accept a high-voltage entry through USB.

  3. Turn on the keysight electrometer (see apparatus manual for instructions)

  4. USB Connectivity

    1. For Windows, make sure you installed XXX; after you connect the electrometer USB cable, windows should pop up as an external driver (hard disk).

    2. For Linux os, you might need to set up the driver manually. The USB setup is explained here.

  5. Run the Python script keysight_usb_connection.py and uncomment the line with the function find_instrument.

  6. Check the USB name and copy it. Then, paste it on the examples/config.py script.

USB Keysight Linux Setup

Given that the USB type-b cable is well setup, type

> lsusb | grep Agilent
Bus 003 Device 054: ID 0957:d618 Agilent Technologies, Inc. FingerPrint

Then, with the printout information, you will write a Udev rule.

> sudo nano /etc/udev/rules.d/99-usb.rules

Write the info about your device on the USB rules file, here is an example:

SUBSYSTEM=="usb", ATTR{idVendor}=="0957", ATTR{idProduct}=="d618", MODE="0666"

You should replace the idVendor and idProduct with the appropriate values.

Then, reload the Udev rules.

> sudo udevadm control --reload-rules
> sudo udevadm trigger

Ready? Now you should be able to find the electrometer in your Python code.

AltAz iOptron - Python Interface

https://www.ioptron.com/product-p/3700az.htm

The AltAz mount has an easy connection to windows os. But it has no straightforward to mac os.

link

image-20240813-162742.png

After some deep dive on some forums, I found out that is possible to have a python interface through RS-232 scripts

https://groups.io/g/iOptron/topic/controlling_cem26_mount_from/97702939

https://github.com/chimerasaurus/ioptron-python

Chris found that we can use the indi library to connect to the iOptron mount. I should check only if they have the driver for the Skyhunter mount.

https://www.indilib.org/

TwilightMonitorDatabase

The TwilightMonitorDatabase class is designed to manage and organize data collected by a twilight monitor. This class allows you to create a structured database for each day, storing information such as exposure times, mount positions, and electrometer data.

http://github.com/estevesjh/twmdb-python

Features

  • Initialization: Automatically sets up the required directory structure and loads or creates a database file for the specified date.

  • Adding Exposures: Easily add new exposures with relevant data such as timestamp, altitude, azimuth, and electrometer readings.

  • Updating Exposures: Update existing exposures by specifying the seq_id and the fields to modify.

  • Data Persistence: Automatically saves the database to a CSV file, ensuring that your data is preserved between sessions.

Example Usage

Initialization

To initialize the database for a specific date:

from datetime import datetime
from twilight_monitor import TwilightMonitorDatabase

# Initialize the database for July 21, 2024
db = TwilightMonitorDatabase(21, 7, 2024)

Add a new exposure

To add a exposure you can simply enter the following information.

# Add a new exposure
db.add_exposure(
    timestamp=datetime.utcnow(),
    alt=45.0,
    az=90.0,
    exp_time_cmd=30,
    filter_type='SDSSr',
    current_mean=0.5,
    current_std=0.01
)

Updating an Exposure

To update an existing exposure, use the update_exposure method by specifying the seq_id and the fields you want to update:

# Update an existing exposure
db.update_exposure(seq_id=1, current_mean=0.55, current_std=0.02)

Data Structure

The database will be rooted in a twmdb-python folder with the following file tree.

.
├── README.txt
├── twmdb.py
└── DATA
    ├── YYYYMM
    │   ├── YYYYMMDD.csv
    │   ├── notes.txt
    │   └── tmp
    │       └── seq_id_XXXXX.csv

Database CSV file information

Every time you close or save the database, a CSV file with panda data frame format is saved. The description of the the CSV file columns is:

  • tmid: Twilight monitor unique IDs defined by the date and time of exposure start, i.e., YYYYMMDDHHMMSS

  • date: Timestamp with date and time in UTC.

  • seq_id: sequence id of the exposure number of the day.

  • exp_time_cmd: Exposure time commanded (exp_time_commanded).

  • exp_time: Actual exposure time.

  • filter: the filter used in the exposure (options include: SDSS{u/g/r/i/z/y} and Empty)

  • alt: commanded elevation in deg with the format of 0.5f

  • az: commanded azimuth in def with the format of 0.5f

  • current_mean: mean current measured by the electrometer during the exposure period. The units are in nano ampere.

  • current_std: current standard deviation of the electrometer output during the exposure period. The units are in nano ampere.

  • alt_std: standard deviation of the altitude values in degrees during the exposure period.

  • az_std: standard deviation of the azimuth values in degrees during the exposure period.

  • electrometer_filename: filename of the electrometer output.

  • flag: TBD

Documents

https://drive.google.com/drive/folders/1sVX5E0UK0jYq_DHZrAbwoV0uhllU9BdI?usp=drive_link

  • No labels