Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 -IN Type B on the back of the electrometer to the laptop

  2. The USB -IN cable is connected to a huble 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)After that,

  4. the electrometer should pop-USB Connectivity

    1. For Windows, ensure you install the Commander expert software. After you connect the electrometer USB cable, Windows should pop up as an external driver

  5. Make sure you have install keysight commander

  6. With keysight commander discover what is the name of the instrument USB

  7. Run the python
    1. (hard disk).

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

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

  9. 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

Code Block
languagebash
> 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.

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

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

Code Block
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.

Code Block
languagebash
> 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

...

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:

Code Block
languagepy
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.

Code Block
languagepy
# 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:

Code Block
languagepy
# 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.

Code Block
.
├── 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

View file
nameTwilightMonitorAug2024.pdf