Dienstag, 9. Juli 2013

LSD 101 for HWR

Notes from an 'idiot's tutorial' on how to get to LSD data base tools
on MPIA computers, and then link this to pythoning... (E. Schlafly --> HWR)

As of July 2013 the PS1 stuff is migrating to aida41233; so: ssh -Y aida41233

then: 

> source /disk/LSD/LSD/lsd_environment_a41233_2
> ipython --pylab

within python


plot(arange(10))  % test whether plotting windows

from lsd import bounds  %
import util_efs_pub
ob=util_efs_pub.query_lsd('select * from ucal_magsqw',bounds=bounds.beam(150.,50.,1.))
% the syntax of that query should be like sql; in essence get "everything" within 1 degree of (150,50)
len(ob)
ob.dtype %take a look at what's in the table
m = numpy.sum(ob['namg_ok']>0,axis=1) >=3
m = numpy.sum(ob['nmag_ok']>0,axis=1) >=3  % pick out those object with good detection in 3 bands
clf(); plot(ob['ra'][m], ab['dec'][m], ',')  % make a plot
clf(); plot(ob['ra'][m], ob['dec'][m], ',')
clf() ; plot(ob['mean'][:,0]-ob['mean'][:,1],ob['mean'][:,0], ',')   % make a CMD
ob.dtype

%save first_lsd_steps 1-18   % that saves the session
ob=util_efs_pub.query_lsd('select * from ucal_magsqw , sdss(matchedto=ucal_magsqw)',bounds=bounds.beam(150.,50.,1.))  % cross-matched catalog
ob_stack=util_efs_pub.query_lsd('select * from stack , sdss(matchedto=stack)',bounds=bounds.beam(150.,50.,1.))   % query stacked catalog
ob_stack=util_efs_pub.query_lsd('select * from ps1_det , sdss(matchedto=ps1_det)',bounds=bounds.beam(150.,50.,1.))
ob_stack.dtype
ob_ps1_det=util_efs_pub.query_lsd('select * from ps1_det , sdss(matchedto=ps1_det)',bounds=bounds.beam(150.,50.,1.))


Issues: there is no single data base that has everything; e.g. to get proper motions,
 one has to talk to Bertrand where this information is....


subsequent e-mail from Eddie

The database that Bertrand has made with Gene's proper motions is in:
/a41217d5/LSD/PS1/tpifeb13
That means if your LSD_DB includes /a41217d5/LSD/PS1
then you can get at the proper motions via
select * from tpifeb13
or
select * from ucal_magsqw, tpifeb13(matchedto=tpifeb13) ...
and things should work.







Keine Kommentare:

Kommentar veröffentlichen