Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

The ASAS-SN Sky Patrol python client

License

NotificationsYou must be signed in to change notification settings

asas-sn/skypatrol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



TestsDocs

ASAS-SN SkyPatrol client

The SkyPatrol pyasassn client allows users to query the ASAS-SN input catalog and retrieve light curves from our photometry database. These light curves are regularly updated with continuous photometry run on nightly images. Read the docshere.

Installation

The easiest way to get started is with pip, using Python 3.6+:

python -m pip install skypatrol

To build from source:

git clone https://github.com/asas-sn/skypatrol.gitpip3 install skypatrol/

Getting started

The SkyPatrolClient will automatically ping the server for the most recent catalog data, allowing us to query through different methods.

frompyasassn.clientimportSkyPatrolClientclient=SkyPatrolClient()client.catalogs
Table Name: stellar_mainNum Columns: 47Table Name: master_listNum Columns: 4Table Name: cometsNum Columns: 1Table Name: swiftNum Columns: 56Table Name: allwiseagnNum Columns: 15Table Name: mdwarfNum Columns: 32Table Name: milliquasNum Columns: 21Table Name: fermiNum Columns: 67Table Name: aavsovsxNum Columns: 28Table Name: morxNum Columns: 38Table Name: chandraNum Columns: 516Table Name: asteroidsNum Columns: 1

Main Catalog

Thestellar_main catalog contains the bulk of our targets. It was built off of ATLAS REFCAT2 and contains GAIA, TESS, SDSS, and ALLWISE identifiers where available.

client.catalogs.stellar_main.head(15)
col_namesdtypes
0asas_sn_idbigint
1ra_degdouble
2dec_degdouble
3refcat_idbigint
4gaia_idbigint
5hip_idstring
6tyc_idstring
7tmass_idstring
8sdss_idstring
9allwise_idstring
10tic_idbigint
11plxfloat
12plx_dfloat
13pm_rafloat
14pm_ra_dfloat

HEASARC Catalogs

The remaining catalogs were sourced from NASA's HEASARC archive. Each of these retains its original columnar data, though we have appended anasas_sn_id for all of them.

client.catalogs.aavsovsx.head(12)
col_namesdtypes
0asas_sn_idbigint
1ra_degdouble
2dec_degdouble
3source_numberbigint
4namestring
5variability_flagbigint
6liidouble
7biidouble
8variability_typestring
9max_mag_typedouble
10max_mag_limitstring
11max_magdouble

The Master List

Themaster_list containsasas_sn_ids coordinates and catalog sources for all of our targets. All of our catalogs are cross-matched on the master list with a 2-arcsecond cone.

client.catalogs.master_list
col_namesdtypes
0asas_sn_idbigint
1ra_degdouble
2dec_degdouble
3catalog_sourcesarray<string>

Cone Seach

Lets run a simple cone-search on the master list.

client.cone_search(ra_deg=270,dec_deg=88,radius=4,catalog='master_list')
asas_sn_idra_degdec_degcatalog_sources
08590494153270.50848084.120395[stellar_main, tic]
18590493551257.33347684.119978[stellar_main, tic]
28590494160273.62833484.120183[stellar_main, tic]
38590494620282.20853184.120019[stellar_main, tic]
48590493763257.57561484.119906[stellar_main, tic]
...............
82247317828630672272.51882889.284092[stellar_main, tic]
822483178286302050.33997689.284143[stellar_main, tic]
82249317828630428142.96842489.283984[stellar_main, tic]
82250317828630825353.47492089.284470[stellar_main, tic]
8225131782864897171.61624289.752714[stellar_main, tic]

82252 rows × 4 columns

Random Curves

For whatever reason, if you are interested in random targets from a given catalog, we can give you those too.

client.random_sample(1000,catalog="aavsovsx")
asas_sn_idra_degdec_degname
066142752862611.36008-88.53342MASTER OT J004526.42-883200.3
117181143984113.42148-87.67768WISE J073341.1-874039
217181129184276.53493-86.82375ASASSN-V J182608.32-864925.1
3661427528887294.50733-86.65919ASASSN-14ft
41118197313.27013-85.89292ASASSN-V J205304.83-855334.5
...............
995515397078518265.46100-41.78668ASASSN-V J174150.64-414712.0
996515397087473210.81929-41.72133ASASSN-V J140316.63-414316.8
9974123169335348.80896-41.72128ASAS J003514-4143.2
998515397087308210.42030-41.72102SSS_J140141.0-414314
999412316939243106.25032-41.72086SSS_J070500.0-414314

1000 rows × 4 columns

Query Lists

If you have a list of external identifiers you can query our catalogs using these.For thestellar_main catalog, use theid_col parameter.For other catalogs you can search by name.

my_tic_ids= [6658326,46783395,1021890]client.query_list(my_tic_ids,catalog='stellar_main',id_col='tic_id')
asas_sn_idra_degdec_deg
0309238124040329.260377-8.035864
133500769908397.04575918.214838
233500769370181.16442218.222147
my_vso_id='ASASSN-V J182608.32-864925.1'client.query_list(my_vso_id,catalog='aavsovsx')
asas_sn_idra_degdec_degname
017181129184276.53493-86.82375ASASSN-V J182608.32-864925.1

ADQL Queries

We have inculded a custom ADQL parser. That will allow users to query targets using this familiar SQL-like language.First, take note how we can use this to perform a cone-search.

query="""SELECT *FROM stellar_mainWHERE DISTANCE(ra_deg, dec_deg, 270, -88) <= 5.1"""client.adql_query(query)
asas_sn_idra_degdec_degrefcat_idgaia_idhip_idtyc_idtmass_idsdss_idallwise_id...pstarrs_r_mag_contribpstarrs_i_magpstarrs_i_mag_dpstarrs_i_mag_chipstarrs_i_mag_contribpstarrs_z_magpstarrs_z_mag_dpstarrs_z_mag_chipstarrs_z_mag_contribnstat
0109490214.059417-89.8463611801405941643674611690901807713792NoneNoneNoneNoneNone...116.1749990.1000.00115.8100000.1000.0010
11099017182.038926-89.8049712318203892640355764625115221143040NoneNoneNoneNoneNone...117.5440010.1000.00117.4480000.1000.0010
21105675309.260296-89.7430423030926029583516341076010576210432NoneNoneNoneNoneNone...3312.1470000.0210.033311.9330000.1000.0110
3110907939.243573-89.7099963403924357280064611694161685666944NoneNoneNoneNoneNone...117.0830000.1000.00116.8790000.1000.0010
41110860281.009406-89.7016363528100940580386341087418009385600NoneNoneNoneNoneNone...3316.5210000.1000.00116.4920010.1000.0010
..................................................................
24512377310219747256.853379-83.00113083925685337886775773920596978196224NoneNoneNoneNoneNone...4116.0590000.0223.284115.9030000.0280.0091
24512477310248925260.635568-82.99736484026063556831965773744258504279552NoneNoneNoneNoneNone...116.0359990.0900.02115.9430000.0900.0010
245125266288894288276.533820-82.97452784327653381906016359213240854465280NoneNoneNoneNoneNone...4116.8250010.0530.36916.8750000.0241.3290
24512677310240409278.626894-82.94687684627862689337826359204964453699328NoneNoneNoneNoneNone...916.9860000.0250.31916.7090000.0460.4390
24512777310268049263.648603-82.93554684726364860373785773736699361849344NoneNoneNoneNoneNone...917.4950010.0590.46917.4310000.0250.2590

245128 rows × 47 columns

JOINS

Since we have cross matched all of our catalogs. We can use ADQL to explore targets accross catalogs.

query="""SELECT asas_sn_id, chandra.name AS c_name, swift.name AS s_nameFROM chandraJOIN swift USING(asas_sn_id)"""client.adql_query(query)
asas_sn_idc_names_name
06614305427822CXO J165358.5-395225GROJ1655-40
16614305643272CXO J174544.4-285744GALACTICCENTER
26614305633092CXO J174538.4-285744GALACTICCENTER
36614304907202CXO J132524.3-430110CenA
46614305016882CXO J140304.7+541924PTF11kly
............
4726614305622832CXO J174532.1-290054GALACTICCENTER
4736614305622862CXO J174545.7-290054GALACTICCENTER
4746614305610042CXO J174547.5-290053GALACTICCENTER
4756614305628132CXO J174547.4-290052GALACTICCENTER
4766614304683632CXO J121900.0+472049NGC4258

477 rows × 3 columns

Complex Searches

Lets say we were searching for white dwarfs that crossmatched in the VSO catalog.

query="""SELECT  asas_sn_id,  gaia_id,  pstarrs_g_mag,  (gaia_mag - (5 * LOG10(plx) - 10)) AS g_mag_abs,  nameFROM stellar_mainJOIN aavsovsx USING(asas_sn_id)WHERE 1=1 AND pstarrs_g_mag < 14 AND (gaia_mag - (5 * LOG10(plx) - 10)) > 10 AND (gaia_b_mag - gaia_r_mag) < 1.5"""client.adql_query(query)
asas_sn_idgaia_idpstarrs_g_magg_mag_absname
081666577549681561652096011.40719.708543ASAS J170324-7937.2
1118602578584376979305804810.25816.563561ASAS J142524-7758.4
2588857105543097396310284811.69615.816850NSV 5012
372840422866014569454379528.67716.979321V0462 Cep
4882997229698208366185459213.81025.175794WISE J211009.8+791037
..................
86597652835029334592338202293714368013.34524.216244ASASSN-V J171026.75-553046.2
8659865283527074258944436328059349769.79317.875823HD 127021
86599652835624417533492521649119936012.14924.397192GDS_J1142208-613045
86600661425088337525831798509310707211.68321.799361IV Car
86601661425544613533540979622418137611.92222.474754ASASSN-V J114927.29-601925.8

86602 rows × 5 columns

Downloading Curves

Any of the previous functions can takemode='download_curves' as a parameter to download the lightcurves coresponding to these targets.

The client will return a LightCurveCollection object which can be used for further analysis and plotting.

# Should take about 1-2 minuteslcs=client.adql_query(query,mode="download_curves",threads=2)lcs.data
jdfluxflux_errmagmag_errlimitfwhmasas_sn_idcam
02.458829e+0620.3428580.08842413.1290360.00472517.2862211.448590141875bC
12.458799e+0618.6656190.08724813.2224600.00508117.3007551.438590141875bC
22.458828e+0619.1528750.07659013.1944810.00434717.4422131.468590141875bC
32.458486e+0620.5874380.01832413.1160600.00096718.9950691.668590141875bC
42.458676e+0619.3331770.08992213.1843080.00505617.2679821.508590141875bC
..............................
672.458767e+0611.3062720.10499613.7667670.01009417.0997062.09627065865626bF
682.458735e+0611.4818910.09764113.7500320.00924317.1785602.05627065865626bF
692.458728e+0611.5320060.08778113.7453030.00827417.2941421.98627065865626bF
702.458690e+068.1610640.08565814.1206990.01140917.3207251.98627065865626bF
712.458608e+0611.4191760.05443413.7559790.00518117.8129591.45627065865626bF

10357650 rows × 9 columns

lcs.stats()
mean_magstd_magepochs
asas_sn_id
672213.7136550.143119557
72059.3544850.433855243
1013811.9805290.032530410
1270213.0712510.166151547
1505512.4481670.345866235
............
66142554778613.4877000.105852137
66142554796913.2876090.14178454
66142554844113.6908420.124418157
66142554847011.9176270.024326143
66142554859113.1082760.067760157

86539 rows × 3 columns

lightcurve=lcs[15055]lightcurve.meta
asas_sn_idgaia_idpstarrs_g_magg_mag_absname
6726515055578467488155146739212.35124.402487BV Cha
lightcurve.plot()

png

client.adql_query("SELECT * FROM aavsovsx WHERE asas_sn_id = 15055")
asas_sn_idra_degdec_degsource_numbernamevariability_flagliibiivariability_typemax_mag_type...min_mag_systemepochepoch_flagperiod_limitperiodperiod_flagref_bibcode_1ref_bibcode_2ref_bibcode_othersclass
015055195.58829-79.757319336BV Cha0303.438856-16.896307CWBNaN...V2451872.85NoneNone1.23804None1963VeSon...6....1H2009yCat....102025SNone2900

1 rows × 28 columns

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp