Working with Multiple Surveys#

Combining Data Sets#

The merge() method of a DataSet can be used to combine it with another, as long as they store data of the same type (for a tutorial on plotting multiple types of data together, see here). Along with serving as the reversal of split(), merge() also allows for data from more than one survey to be utilised simultaneously:

from ATK import query

target = 587316166180416640

asassn_data = query("lightcurve", targets=target, survey="asassn", path="asassn_lightcurve.fits.gz")
gaia_data = query("lightcurve", targets=target, survey="gaia", path="gaia_lightcurve.fits.gz")

merged_data = asassn_data.merge(gaia_data)
merged_data.show()
merged_data.open()
<Lightcurve DataSet>

.kind:      Lightcurve
.targets:   587316166180416640 | 141.185° 8.031° (icrs, 2016-01-01T00:00:00.000, 3.0″)
.exception: False
.data:
      <asassn v-band Lightcurve>
            survey:     asassn
            band:       v
            correction: full
            search_pos: 141.185° 8.031° (icrs, 2015-01-01T00:00:00.000)
            separation: 0.243″
            mjd:        [55946.483, 55954.478, ..., 58407.619, 58431.588] d
            mag:        [17.58, 17.911, ..., 17.3, 17.53] mag
            mag_err:    [0.152, 0.177, ..., 0.179, 0.202] mag
            ra:         [141.185, 141.185, ..., 141.185, 141.185] °
            dec:        [8.031, 8.031, ..., 8.031, 8.031] °

      <asassn g-band Lightcurve>
            survey:     asassn
            band:       g
            correction: full
            search_pos: 141.185° 8.031° (icrs, 2015-01-01T00:00:00.000)
            separation: 0.243″
            mjd:        [58056.48, 58080.455, ..., 60674.38, 60704.982] d
            mag:        [17.774, 18.085, ..., 17.467, 18.217] mag
            mag_err:    [0.181, 0.204, ..., 0.097, 0.188] mag
            ra:         [141.185, 141.185, ..., 141.185, 141.185] °
            dec:        [8.031, 8.031, ..., 8.031, 8.031] °

      <gaia g-band Lightcurve>
            survey:     gaia
            band:       g
            correction: full
            search_pos: 141.185° 8.031° (icrs, 2016-01-01T00:00:00.000)
            separation: 0.0″
            mjd:        [56956.46, 57138.227, ..., 57854.228, 57889.954] d
            mag:        [18.023, 18.806, ..., 18.548, 18.503] mag
            mag_err:    [0.051, 0.021, ..., 0.011, 0.014] mag
            ra:         [141.185, 141.185, ..., 141.185, 141.185] °
            dec:        [8.031, 8.031, ..., 8.031, 8.031] °

      <gaia bp-band Lightcurve>
            survey:     gaia
            band:       bp
            correction: full
            search_pos: 141.185° 8.031° (icrs, 2016-01-01T00:00:00.000)
            separation: 0.0″
            mjd:        [56956.461, 57138.227, ..., 57854.229, 57889.954] d
            mag:        [18.201, 19.645, ..., 18.954, 18.673] mag
            mag_err:    [0.041, 0.091, ..., 0.047, 0.056] mag
            ra:         [141.185, 141.185, ..., 141.185, 141.185] °
            dec:        [8.031, 8.031, ..., 8.031, 8.031] °
+1 more ...

Available Methods: .add(), .apply(), .from_target(), .merge(), .open(), .plot(), .save(), .show(), .split(), .store()
Bokeh Figure





Download this Tutorial

Total running time of the script: (0 minutes 0.723 seconds)

Gallery generated by Sphinx-Gallery