-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
There needs to be some documentation available for how to develop and locally test new / updated derived parameter definitions. Here is what was sent by email in 2011. The docs should generalize this specific example:
% cd <my_work_dir>
% tar xf /proj/sot/ska/pkgs/Ska.engarchive-0.14.tar.gz
% cd Ska.engarchive-0.14
(The 0.14 might change. Always look for the latest version).
Now edit Ska/engarchive/derived/init.py and add a line like
from .pcad import *
where "pcad" is the name of the new derived parameter module that you
have placed into the Ska/engarchive/derived/ directory. Now from the
top (Ska.engarchive-0.14/) directory run python:
% ipython -pylab
from Ska.Matplotlib import plot_cxctime
import Ska.engarchive
print Ska.engarchive.__file__
# The above should show "Ska/engarchive/__init__.pyc" which means
# you are using your local dev version of the Ska engarchive package.
import Ska.engarchive.derived
dp = Ska.engarchive.derived.DP_DPA_POWER() # YOUR CLASS HERE
data = dp.fetch('2011:001', '2011:010')
vals = dp.calc(data)
plot_cxctime(data.times, vals)
# If your derived params class sets bad values you might want to do this:
ok = ~data.bads
plot_cxctime(data.times[ok], vals[ok], '.')
Reactions are currently unavailable