Skip to content

Instantly share code, notes, and snippets.

David Young thespacedoctor

Block or report user

Report or block thespacedoctor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
thespacedoctor /
Last active Dec 12, 2019
[Generate an SOF from directory of FITS files] #fits #sof #esorex

Set of Frames (SOF) Files

Here's an example of sof (set of frames) files generated by the XSHooter pipeline when creating a master bias frame.

There are 4 files creates:

  1. data.sof
  2. input_sof.json
  3. output_files.sof
  4. products_sof.json
thespacedoctor /
Last active Dec 7, 2019
[Parse Ligo-Virgo GCN VOEvents] #voevent #ligo_virgo #gcn

Parsing VOEvents Streamed from the Ligo-Virgo GCN Feed

Here you will find VOEvent packet examples for the 4 types of LV event alerts:

LV Alert Timeline<br>Image Credit: LVEM User Guide

  1. Preliminary GCN Notice. The automated preliminary notice is sent (via GCN) within 1-10 minutes of event detection and the trigger visible in GraceDB. Once a map has been generated a second preliminary notice is sent.

  2. Initial GCN Notices. A source classification (BNS, NSBH, BHBH ..) and updated skymap will be released within 4-24 hrs. The initial notice is also accompanied by a GCN Circular which is the first formal publication of the candidate and can be cited as such.

thespacedoctor /
Last active Nov 7, 2019
[Reflex Python Plugin Support] #python #reflex #pipeline #soxs #muse
# This file shows the minimum example of a Python based EsoRex recipe that can
# be integrated into a EsoReflex workflow, i.e. executed with the RecipeExecuter
# actor.
# The appropriate module needs to first be loaded that provides the facilities
# for declaring an EsoRex recipe plugin.
import esorexplugin
# Additionally it is convenient to import some of the utility functions from the
# module directly into this code's namespace. Note, the import statement above
thespacedoctor /
Created Oct 22, 2019
[List a subset of keywords from all FITS frames in a specified directory] #fits #xshooter #soxs #keyword

Report a list of the DPR.CATG, DPR.TECH and DPR.TYPE keywords from FITS frames.

Just copy the script into the directory of frames and run:

sh .
thespacedoctor /
Last active Oct 9, 2019
[Kurucz Atomic Database Downloader] #atom #download #kurucz
# encoding: utf-8
*Scrape and download Kurucz atom lists*
David Young
:Date Created:
October 8, 2019
thespacedoctor / build_scheduler_api_calls_table.sql
Last active Oct 4, 2019
[Build Statistics Table for SOXS Scheduler API Calls] #soxs #scheduler #mysql
View build_scheduler_api_calls_table.sql
drop table scheduler_api_calls;
CREATE TABLE `scheduler_api_calls` (
`primaryId` bigint(20) NOT NULL AUTO_INCREMENT,
`transientBucketId` bigint(20) NOT NULL,
`objectName` varchar(50) NOT NULL,
`magnitude` double DEFAULT NULL,
`limitingMagnitude` tinyint(4) DEFAULT NULL,
`apiCallType` varchar(45) DEFAULT NULL,
`triggerTime` datetime NOT NULL,
thespacedoctor /
Last active Oct 10, 2019
[Renaming ESO Fits Frames Back to Their ORIGFILE Names] Renaming the XShooter fits files back to original more informative names instead of the ESO archive name #eso #xshooter #filename #fits

Renaming ESO Fits Frames Back to Their Original Names

Once FITS frames are added to the ESO Archive they are renamed with a standardised format. The original names are often more informative. This is a bash script to rename ESO fits files back to their original names.

thespacedoctor /
Last active Sep 17, 2019
[AVRO to MySQL Import Speed Test] #mysql #kafka #avro #ztf #lsst

AVRO to MySQL Import Speed Test

This script will run on a folder of ZTF avro alerts (e.g. an unarchived bundle from the ZTF nightly archives).

Create a conda environment within which to run the script:

conda create -n avro_speed_test python=2.7 pip
thespacedoctor /
Created Aug 8, 2019
[Good or Bad Astrometry] work through folder of FITS images and overlay astrometry than filter via good/bad #pessto #astrometry #image
#!/usr/bin/env python
import glob
import re
import string
import os
import ntt
thespacedoctor /
Created Aug 8, 2019
[Generate a Multimarkdown Links to Images in an Assets Folder] #images #markdown
You can’t perform that action at this time.