Aug 9, 2012

Two SDSS data pulls around Pal5

/home/ch558/palomar5/sdss_result.csv
proper motions
ra, dec, psfmag_g, gmr, pm_ra, pm_dec, pm_ra_err, pm_dec_err
pulled with web interface


/home/ch558/palomar5/sdss_pal5_fehz.csv
Fe/H and z redshift
elodieFeH, elodieZ, elodieZErr, z, zErr, ra, dec, g, r
pulled with SQL, i.e.:


SELECT s.ra, s.dec, s.psfmag_g, (s.psfmag_g - s.psfmag_r) as gmr,
    pm.pmra, pm.pmdec, pm.pmraerr, pm.pmdecerr
FROM star s
    JOIN propermotions pm ON s.objid = pm.objid 
WHERE 
   s.ra BETWEEN 239.38 AND 243.38
   AND s.dec BETWEEN 5.2 AND 7.2
   AND CLEAN=1



Both data files cover the same areas, as suggested by Nitya: Combined separate queries +/- 2 degrees in RA, and +/- 1 degree in Dec around the following pointings:
    RA      DEC
1) 226.5, -2.5
2) 228.36, -0.66
3) 230.22, 0.75
4) 232.08, 2
5) 233.94, 3.2
6) 239.52, 5.9
7) 241.38, 6.2

SDSS: CMD and Velocity cuts (no members found)

Again, the second (Fe/H, z) SDSS dataset (/home/ch558/palomar5/sdss_pal5_fehz.csv).

CMD cut selects 1880 of the 16982 members. None of those then pass the velocity cut (-70 < * < -35 km/s). Only 3 of the 16982 stars pass the velocity cut, none of which also pass the CMD cut.


SDSS Pal5 dataset 2: radial velocities and [Fe/H]

datafile: /home/ch558/palomar5/sdss_pal5_fehz.csv
(columns: eFeH, eZ, eZerr, z, z_err, ra, dec, g, r)


Spatial Coverage:
(white is this datafile, red X's are selected members of Hydra)

[no matches between this SDSS dataset and our Hydra members)


Proper Motion with error bars


Aug 7, 2012

Proper Motion cut


Of 123 possible Hydra members, SDSS has matches for 93. 79 of those pass this PM cut (pm le 10), reducing the number of Hydra members of 109 (those 79 plus the 30 members SDSS does not match).

Aug 6, 2012

SDSS proper motions for Palomar 5

First, spatial plot and proper motion (pm_ra and pm_dec added in quadrature) histogram for all stars from SDSS:





Next, using spherematch to find overlap with the hydra members:

 



Aug 2, 2012

Palomar 5 Project Summary


Files for this project can be found in /home/ch558/palomar5/

Membership Selection:
=========================
KECK
cmd: dist le 0.1 to isochrone
(isochrone dist modulus = 16.808, see selection.pro for extinction, etc)
velocity cuts: -70 < * < -40 km/s
HYDRA
cmd: dist le 0.1 to isochrone
(isochone dist modulus = 16.808, see hydraselection.pro for extinction, etc)
velocity cuts: -70 < * < -35 km/s
magnesium: on a plot of (mg1 + mg2) vs (mgb), members are < 2 from (0.15,1.0)
ODEN
velo: -80 < * < -30
(done in allvelo.pro and allcenter.pro) 

Overlapping data:
=========================
overlap.pro gives overlaps between keck and hydra data
doubles.pro finds doubles in the hydra data
oden.pro looks for overlap between odenchirken's data and keck+hydra


Relevant code:
=========================
allvelo.pro
Reads in keck, hydra, and oden data and combines it (requires that the alldata_Pal5.fits.gz and allhydra_Pal5.fits.gz files have usable x.member columns (that = 1 for members). Plots l*cos(b) versus velocity, creates bins. Plots the bins and the dispersion bins, and then does a linear fit to the velocity bins. Prints slope of fit line (the velocity gradient per degree) and the average dispersion.


allcenter.pro
Same as allvelo.pro, but only looks at the center of pal5 (limits made and can be changed in the binning section of the code... change max_covered's first definition to control start point of binning and then change n_bins and the binning increments to adjust end point)


overlap.pro
Finds overlap between hydra and keck


doubles.pro
Finds doubles in the hydra data


oden.pro
Looks for overlap between odenkirchen's data and keck+hydra


selection.pro
Does selection for keck data, including lots of plots showing the cuts. Requires the besancon model (mw-model.resu) and m92.iso isochrone)


hydraselection.pro
Same as selection.pro, but for hydra data. 


Note: selection.pro is for keck data, hydraselection.pro for hydra data. Both have commented-out sections at the end which write the "member" column back to the fits file


Data files:
=========================
alldata_Pal5.fits.gz
allhydra_Pal5.fits.gz
(both files have member=1 for members selected by [hydra]selection.pro)

oden_center.dat
oden_tail.dat
(membership cuts only done in allvelo.pro, allcenter.pro, "just in time")


hydradoubles.dat
(two-column file listing indicies for pairs in hydra data after a quality cut)


Misc Notes
=========================
Hydra systemic error calculated to be +/- 9.8, this has already been 
added into the fits file errors


What's Next
=========================
• The doubled stars (doubles.pro, overlap.pro, oden.pro) should be folded
into each other, rather than being counted multiple times.


• In allvelo.pro, try fitting the velocity gradient line to all of the
member stars, instead of binning them (likely will just give far too much 
weight to the center of Pal5, but easily tried)


• Membership probabilites instead of hard binary cuts. Right now the members are likely, but not secure.

Palomar 5 center velocity gradient







Velocity gradient: 0.314982 km/sec per degree
This value is very sensitive to changes in bin size, bin number, and what is chosen as the edge of the center.

Average dispersion: 1.506 km/sec

Palomar 5 Velocity Gradient



All members, velocity and dispersion. Linear fit done with robust_linefit.










Velocity gradient: 0.4236 km/sec per degree
Odenkirchen's velocity gradient: 1.0 ± 0.4 km/sec per degree


Our average dispersion: 2.8 km/sec
Odenkirchen's dispersion: 4.7 km/sec OR 2.2 km/sec (when removing two outliers)

Jul 27, 2012

Overlap Sigmas

Overlap between Hydra and Keck:

Note that one is 3+ sigma away.



Oden overlap:

Looks great, a small number with sigma > 1 as expected.

Jul 26, 2012

Hydra doubles, spatial
































 
white -- all stars (quality ge 3) in the hydra data
red x -- stars with multiple reads

Hydra doubles

These are the entries in allhydra_Pal5.fits.gz which are for the same star. Numbers indicate indicies from the fits file after a where(x.zquality ge 3) cut is done to the data. Available as hydradoubles.dat. Note that a few more pairs exist (i.e, 0 matches 1043, 1066, and 1178, but 1043 is not paired with 1066 or 1178, etc.)



           0        1043
           0        1066
           0        1178
           3        1038
           3        1350
           4        1065
          10        1087
          10        1182
          13        1092
          13        1432
          14        1419
          15        1060
          16          70
          16         143
          17        1088
          18        1075
          18        1175
          19        1324
          21         117
          21        1053
          21        1081
          21        1428
          22        1210
          25        1201
          26        1056
          26        1420
          28        1052
          28        1061
          28        1162
          29        1352
          31          96
          31        1080
          32        1035
          34          64
          34         162
          34        1046
          34        1187
          34        1371
          35         150
          36        1086
          37        1422
          41          87
          41         147
          41        1030
          42        1064
          42        1415
          43        1048
          43        1218
          43        1346
          43        1437
          44         179
          46        1104
          46        1440
          48        1332
          49        1049
          51        1172
          52        1190
          53        1195
          54        1076
          55        1173
          55        1446
          56        1096
          56        1212
          57        1031
          57        1356
          60         175
          61        1159
          61        1363
          62        1204
          65        1368
          66        1348
          67        1183
          69        1217
          69        1347
          73        1330
          74        1032
          74        1345
          78        1200
          78        1362
          80        1059
          82        1336
          83        1179
          85        1340
          90        1216
          91        1215
          91        1353
          94        1163
          95        1051
          97        1165
          98        1202
          99        1337
         100         196
         101        1214
         102        1168
         110        1360
         113        1207
         113        1341
         114         193
         115        1045
         116        1328
         118        1193
         118        1359
         119         135
         123        1343
         124        1171
         124        1327
         132        1147
         139        1039
         142        1101
         156        1493
         157        1091
         157        1431
         161        1123
         170        1413
         171        1097
         174        1144
         174        1471
         177        1414
         181        1473
         182        1145
         183        1416
         186        1469
         188        1499
         189        1454
         199        1383
         213        1374
         222        1381
         223        1174
         225        1410
         231        1399
         236        1395
         239        1393
         242        1390
         244        1411
         246        1405
         251        1397
         256        1373
         262        1375
         269        1364
         270        1115
         274        1121
         274        1497
         278        1135
         280        1148
         281        1470
         282        1125
         282        1455
         284        1126
         291        1119
         294        1154
         295        1459
         296        1117
         299        1456
         302        1138
         305        1139
         305        1495
         306        1124
         307        1127
         308        1134
         311         345
         313        1492
         315        1149
         317         372
         321        1490
         323        1155
         323        1500
         329        1220
         335        1235
         356        1226
         368        1250
         374        1241
         375        1237
         387        1222
         459        1013
         465         995
         470         996
         487         980
         490         994
         494        1012
         499        1011
         500        1016
         505        1009
         508        1021
         515         983
         517         987
         519         982
         523        1382
         534        1379
         563        1400
         582        1392
         585        1377
         717        1262
         721        1287
         722        1269
         724        1299
         725        1291
         737        1319
         749        1259
         761        1267
         763        1310
         766        1266
         767        1292
         772        1293
         778        1286
         779        1311
        1033        1418
        1034        1073
        1034        1421
        1036        1068
        1041        1433
        1044        1427
        1047        1167
        1054        1325
        1058        1185
        1078        1424
        1083        1429
        1105        1441
        1109        1442
        1110        1447
        1114        1448
        1122        1491
        1130        1502
        1142        1482
        1156        1462
        1158        1335
        1164        1351
        1164        1443
        1166        1369
        1169        1333
        1170        1322
        1188        1365
        1189        1344
        1209        1349
        1211        1321

Pal5 Hydra doubles – ∆V




Left histogram is velocity differences for each pair
Right histogram is partially normalized... There are only 16 pairs with errors for both. The others all have only errors for the first in each pair.

Jul 19, 2012

Pal5 Selection, Velocities

Keck Palomar5 selection


WIYN Hydra selection


Keck Velocities Big


mg_maxlike_sigma – Keck velocities per-mask, sigmas





Jul 3, 2012

Velocity Function comparison

Velocity function histograms. White is Besancon model, yellow is Pal5 data:


Besancon model cmd



 Besancon model CMD:

Jun 21, 2012

Four hidden dwarfs: Distance, # Stars, Radius, CMD

Dwarf 1
44 kpc
3854 stars
0.905949 circular radius












Dwarf 2
150 kpc
233 stars
0.112978 circular radius











Dwarf 3
225 kpc
157 stars
0.0687904 circular radius









Dwarf 4
300 kpc
120 stars
0.060705 circular radius





spatially, these are:

3, 4
1, 2

Jun 19, 2012

LSST spatial, r=22.0 limit



This plot includes only those stars where(r le 22.0), simulating SDSS depth. Here two of the four dwarfs are still clearly visible.

LSST Dwarf Distance Moduli

objType=18 (dwarfs only) CMD

Isochrone shifted +18.217 (44 kpc):


Isochrone shifted +20.880 (150 kpc):


Isochrone shifted +21.761 (225 kpc):


Isochrone shifted +22.386 (300 kpc):


LSST Galaxy CMD

Color-magnitude diagrams for galaxies in LSST data (tisStar=0)

All galaxies:


Galaxies around dwarf1 (top left of spatial plot, 0.4x0.4 square centered around it) 


Galaxies around dwarf2 (top right of spatial plot, 0.4x0.4 square centered around it)


Galaxies around dwarf3 (bottom right of spatial plot, 0.4x0.4 square centered around it)


Galaxies around dwarf4 [largest] (bottom left of spatial plot, 0.4x0.4 square centered around it)


Jun 18, 2012

Getting plot_smooth running

Spatial plots using plot_smooth:

ComaB:


Draco:
























Leo IV:



LSST "Hidden" Dwarfs: Luminosity Functions




 These are the luminosity functions of the four dwarf galaxies hidden in the sample LSST data. On each graph, the white plot is the same – the sample dwarf galaxy used to generate the data. The yellow plot is the luminosity function of one of the hidden dwarfs, starting from the top-left and continuing clockwise as seen in this spatial plot:








Jun 14, 2012

Comparing Sample Dwarf Galaxies

Left plots are "mario", right plots are "dwarfGalaxy"


g-r vs g CMD:



r vs # of stars:


r vs # of stars, log10 y-axis (note different x-axis scales):


LSST sample data - Accuracy Plots

r_mag vs (r_mag – t_r_mag) [i.e., accuracy of LSST]

All data:


Stars only:


Galaxies only:


Jun 7, 2012

Automated searching with varied distances, part 2

Still working with Leo IV. 

First, a familiar pair of graphs. Left graph is distance modulus being tested versus size of stellar population it selects. Right graph is distance modulus versus the calculated "metric" for that distance. The "metric" sums 3*(value of highest density histogram bin) + 2*(value of 2nd highest) + 1*(value of 3rd highest).


Using this data, I then try to calculated an estimated distance modulus for Leo IV.

The "adjusted metric" at the bottom is the estimated distance I come up with as a final answer: 21.00 (actual value = 20.98). This is very accurate for Leo IV, but quite possibly will not work well for other dwarfs.

How this is calculated:
First the distance which gives the highest weighted metric (i.e, greatest y-value on the right graph) is the first part (= 20.50 for Leo IV).
Second, the distance which has a local maxima of stellar population size (local max y-value on left graph) is found (= 21.50 for Leo IV).
These two are then averaged to find the final estimated distance (=21.00 for Leo IV). 

More Automated Distance-Finding for Leo IV

Left plot:
Distance modulus versus # stars selected. The yellow line at 750 stars represents the cutoff point; distances which select fewer stars are not included on the right plot (i.e, y-axis values set to zero). This minimum value is chosen to reduce the impact of very small populations on the final distance estimated. It is not a great solution, but in this case it does improve the results.

Right plot: 
Distance modulus versus # max-density (color=255) bins. The distance with the maximum y-value on this plot is returned as the estimated distance.

In this case, this algorithm returns 21.5 as the estimated distance modulus. Actual distance modulus: 20.98 (according to NED). 

Ideally the algorithm should return 21.0 as the estimated distance. This requires a more effective way of quantitatively valuing the different distances. 

Jun 5, 2012

(Early) Automation of finding distance - step through Leo IV




The left plot shows the relationship between distance modulus and number of stars selected by the isochrone for Leo IV. The distance moduli are stepped through one at a time, from 16.5 to 24.0 by increments of 0.5. The right plot shows distance modulus (same steps) versus the value of the densest bin in the histogram.