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
thespacedoctor / 0README.md
Last active Dec 12, 2019
[Generate an SOF from directory of FITS files] #fits #sof #esorex
View 0README.md

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
thespacedoctor / 01_README.md
Last active Dec 7, 2019
[Parse Ligo-Virgo GCN VOEvents] #voevent #ligo_virgo #gcn
View 01_README.md

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
thespacedoctor / example_recipe.py
Last active Nov 7, 2019
[Reflex Python Plugin Support] #python #reflex #pipeline #soxs #muse
View example_recipe.py
# 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
thespacedoctor / README.md
Created Oct 22, 2019
[List a subset of keywords from all FITS frames in a specified directory] #fits #xshooter #soxs #keyword
View README.md

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 report_fits_keywords_for_directory.sh .
@thespacedoctor
thespacedoctor / download_kurucz_atoms.py
Last active Oct 9, 2019
[Kurucz Atomic Database Downloader] #atom #download #kurucz
View download_kurucz_atoms.py
#!/usr/local/bin/python
# encoding: utf-8
"""
*Scrape and download Kurucz atom lists*
:Author:
David Young
:Date Created:
October 8, 2019
@thespacedoctor
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
thespacedoctor / README.md
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
View README.md

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
thespacedoctor / README.md
Last active Sep 17, 2019
[AVRO to MySQL Import Speed Test] #mysql #kafka #avro #ztf #lsst
View README.md

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
thespacedoctor / goodbadastro.py
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
View goodbadastro.py
#!/usr/bin/env python
import glob
import re
import string
import os
import ntt
@thespacedoctor
thespacedoctor / generate_mmd_page_of_mmd_image_links.py
Created Aug 8, 2019
[Generate a Multimarkdown Links to Images in an Assets Folder] #images #markdown
View generate_mmd_page_of_mmd_image_links.py
You can’t perform that action at this time.