Skip to content

Instantly share code, notes, and snippets.

View tony-johnson's full-sized avatar

Tony Johnson tony-johnson

  • SLAC
  • Menlo Park, CA
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tony-johnson
tony-johnson / REBTempsVsTriggerCount.ipynb
Created June 12, 2019 15:48
Reb Temperatures vs Trigger Count
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env ccs-script
#
# A simple script for taking data with the ATS.
#
from org.lsst.ccs.scripting import *
from org.lsst.ccs.bus.states import AlertState
from optparse import OptionParser
from org.lsst.ccs.subsystem.rafts.fpga.compiler import FPGA2ModelBuilder
from java.io import File
import time
@tony-johnson
tony-johnson / fp.py
Last active September 12, 2018 16:41
Focal Plane data taking script (Conceptual)
from org.lsst.ccs.scripting import *
from org.lsst.ccs.bus.states import AlertState
from datetime import date
from optparse import OptionParser
from org.lsst.ccs.subsystem.rafts.fpga.compiler import FPGA2ModelBuilder
from java.io import File
import time
from org.lsst.ccs.utilities.image.samp import SampUtils
from java.io import File
from java.time import Duration
@tony-johnson
tony-johnson / focal-plane__Rafts.properties
Created August 23, 2018 16:33
Example focal-plane configuration file
R11/Reb0/ASPIC0/af1 = 0
R11/Reb0/ASPIC0/clamp = 0
R11/Reb0/ASPIC0/gain = 0
R11/Reb0/ASPIC0/rc = 0
R11/Reb0/ASPIC0/tm = 0
R11/Reb0/ASPIC1/af1 = 0
R11/Reb0/ASPIC1/clamp = 0
R11/Reb0/ASPIC1/gain = 0
R11/Reb0/ASPIC1/rc = 0
R11/Reb0/ASPIC1/tm = 0
@tony-johnson
tony-johnson / fcompress
Created July 18, 2018 05:12
Example file for compressing .fits files while maintaining modification date and file name
#!/bin/bash
# Compress a FITS file while preserving its name and date
#
# Can be used as follows:
#
# find . -name "*.fits" -mtime +30 -exec fcompress {} \;
#
# Note that fpack will not recompress file already compressed,
# maybe that is good enough, but we also set a file attribute
# in case we need to test that in future for efficiency reasons.
@tony-johnson
tony-johnson / ats.py
Last active July 28, 2018 00:54
Simple script for taking images with ATS
#
# A simple script for taking data with the ATS.
#
from org.lsst.ccs.scripting import *
from org.lsst.ccs.bus.states import AlertState
from datetime import date
from optparse import OptionParser
from org.lsst.ccs.subsystem.rafts.fpga.compiler import FPGA2ModelBuilder
from java.io import File
import time
@tony-johnson
tony-johnson / combined.csv
Last active March 16, 2016 15:23
Combined phosim metrics
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 22 columns, instead of 8. in line 7.
visit,filter,wcs0,wcs1,wcs2,wcs3,obshistid,expmjd,filter,rotskypos,start_run,end_run,altitude,rawseeing,airmass,moonalt,moonphase,dist2moon,sunalt,cputime,hostname,runlimit
200,r,3,107,0.104,0.058,200,59580.125,2,256.416,57448.367,57448.73,70.8431,0.7441,1.0586,-36.2917,3.8842,124.437,-30.8095,30202.13,3,0
220,g,3,94,0.092,0.048,220,59580.137,1,256.719,57448.547,57448.906,67.7483,0.8692,1.0805,-36.2197,3.8387,124.3299,-32.2253,25589.48,3,0
230,i,3,117,0.115,0.065,230,59580.141,3,256.752,57448.555,57448.918,66.0231,0.7912,1.0944,-36.0954,3.8129,124.2682,-32.9399,28681.54,3,0
250,z,3,112,0.118,0.068,250,59580.152,4,256.639,57448.555,57449.102,62.9989,0.9289,1.1223,-35.7332,3.7678,124.1589,-34.057,40600.57,3,0
276,y,3,88,0.133,0.073,276,59580.164,5,256.267,57448.555,57449.48,59.1991,1.1328,1.1642,-35.0218,3.7114,124.0196,-35.2029,66684.06,3,0
1637,u,3,66,0.085,0.053,1637,59582.125,0,256.628,57448.555,57448.695,69.1395,0.6251,1.0701,-26.666,0.3424,104.5353,-30.8702,10283.64,3,0
2226,u,3,63,0.077,0.048,2226,59583.