Cluster analysis around the Herbig AeBe star HD 200775

This use case is based on work by Pérez Blanco+ 2019.

Follow the instructions here to install the pyESASky widget. More information can be found here.

Workflow:

  1. Query the Vioque+ 2018 catalogue of Herbig Ae/Be stars to obtain the stellar parameters, using the VizieR astroquery module.
  2. Query the Gaia archive for sources around HD 200775 and identify possible cluster candidates by filtering on proper motions and quality, using the Gaia astroquery module.
  3. Query the Herschel archive and download a PACS image of the region, using the ESASky astroquery module.
  4. Overlay the Gaia results on the Herschel image.
  5. Visualise the results in the pyESASky widget.

Modification history:

  • Notebook updated to reflect backend changes as of August 2021.
In [3]:
# Import all the required python modules:
import astropy.units as u
from astropy.coordinates.sky_coordinate import SkyCoord
from astropy.units import Quantity
from astroquery.vizier import Vizier
from astroquery.gaia import Gaia
from astroquery.esasky import ESASky
from astropy.wcs import WCS
from astropy.visualization import (MinMaxInterval, SqrtStretch, ImageNormalize, ManualInterval)
from pyesasky.pyesasky import ESASkyWidget
from pyesasky.catalogue import Catalogue
from pyesasky.catalogueDescriptor import CatalogueDescriptor
from pyesasky.metadataDescriptor import MetadataDescriptor
from pyesasky.metadataType import MetadataType
from pyesasky.cooFrame import CooFrame
In [4]:
#%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np

Step 1. Query VizieR

In [5]:
# Search for 'Gaia DR2 study of Herbig Ae/Be stars (Vioque+, 2018)':
catalog_list = Vizier.find_catalogs('Vioque+,2018')
print({k:v.description for k,v in catalog_list.items()})
{'J/A+A/620/A128': 'Gaia DR2 study of Herbig Ae/Be stars (Vioque+, 2018)', 'J/A+A/638/A21': 'New Herbig Ae/Be and classical Be stars catalog (Vioque+, 2020)', 'J/A+A/650/A182': 'Homogeneous study of Herbig Ae/Be stars (Guzman-Diaz+, 2021)', 'J/MNRAS/493/234': 'Herbig Ae/Be accretion rates & mechanisms (Wichittanakom+ 2020)'}
In [6]:
# Get the above list of catalogues:
Vizier.ROW_LIMIT = -1
catalogs = Vizier.get_catalogs(catalog_list.keys())
print(catalogs)
TableList with 13 tables:
	'0:J/A+A/620/A128/hqsample' with 29 column(s) and 218 row(s) 
	'1:J/A+A/620/A128/lqsample' with 29 column(s) and 34 row(s) 
	'2:J/A+A/620/A128/refs' with 4 column(s) and 69 row(s) 
	'3:J/A+A/638/A21/pms' with 17 column(s) and 8470 row(s) 
	'4:J/A+A/638/A21/cbe' with 17 column(s) and 693 row(s) 
	'5:J/A+A/638/A21/either' with 17 column(s) and 1309 row(s) 
	'6:J/A+A/638/A21/sample' with 17 column(s) and 4150983 row(s) 
	'7:J/A+A/650/A182/tableb1' with 29 column(s) and 209 row(s) 
	'8:J/A+A/650/A182/tableb2' with 16 column(s) and 209 row(s) 
	'9:J/A+A/650/A182/tableb3' with 9 column(s) and 73 row(s) 
	'10:J/MNRAS/493/234/main' with 21 column(s) and 30 row(s) 
	'11:J/MNRAS/493/234/tablec' with 20 column(s) and 91 row(s) 
	'12:J/MNRAS/493/234/tabled' with 13 column(s) and 144 row(s) 
In [7]:
# Access the first table: 
Vioque = catalogs['J/A+A/620/A128/hqsample']
print(Vioque[54])
   Name     RAICRS     DEICRS     plx     Dist   Teff    LogL     Av     V   Bin   E_NIR_     E_MIR_     EWHa   Hashape   Vi  UXOR  Mass     Age      E_J_  E_H_   E_Ks_   E_W1_  E_W2_   E_W3_     E_W4_    The SimbadName  _RA.icrs   _DE.icrs
           "h:m:s"    "d:m:s"     mas      pc     K   dex(Lsun)  mag    mag                             0.1 nm                      Msun     Myr                                                                             "h:m:s"    "d:m:s" 
--------- ---------- --------- --------- ------ ----- --------- ------ ----- --- ---------- ---------- -------- ------- ----- ---- ------ ---------- ----- ------ ------- ------- ----- --------- ---------- --- ---------- ---------- ---------
HD 200775 21 01 36.9 +68 09 48  2.770664  360.8 16500      3.07  1.054  7.33 Yes     0.0413     0.0388  -63.830       d  0.07       5.345   4.14e+05  2.25   3.98    8.36   25.21    --    149.52    2914.79 Yes  HD 200775 21 01 36.9 +68 09 48

Step 2. Query the Gaia archive

The following performs an asynchronous query (asynchronous rather than synchronous queries should be performed when retrieving more than 2000 rows) using the Astronomical Data Query Language (ADQL) on the Gaia DR2 catalogue for sources within a search radius of 0.2 degrees around the Herbig Ae/Be star, firstly with no quality filtering on the catalogue.

See here for more information and examples of ADQL queries.

In [8]:
tables = Gaia.load_tables(only_names=True)
INFO: Retrieving tables... [astroquery.utils.tap.core]
INFO: Parsing tables... [astroquery.utils.tap.core]
INFO: Done. [astroquery.utils.tap.core]
In [9]:
# Do the following to load and look at the available Gaia table names:
for table in (tables):
    print (table.get_qualified_name())
external.external.apassdr9
external.external.gaiadr2_geometric_distance
external.external.gaiaedr3_distance
external.external.galex_ais
external.external.ravedr5_com
external.external.ravedr5_dr5
external.external.ravedr5_gra
external.external.ravedr5_on
external.external.sdssdr13_photoprimary
external.external.skymapperdr1_master
external.external.skymapperdr2_master
external.external.tmass_xsc
gaiadr1.gaiadr1.aux_qso_icrf2_match
gaiadr1.gaiadr1.ext_phot_zero_point
gaiadr1.gaiadr1.allwise_best_neighbour
gaiadr1.gaiadr1.allwise_neighbourhood
gaiadr1.gaiadr1.gsc23_best_neighbour
gaiadr1.gaiadr1.gsc23_neighbourhood
gaiadr1.gaiadr1.ppmxl_best_neighbour
gaiadr1.gaiadr1.ppmxl_neighbourhood
gaiadr1.gaiadr1.sdss_dr9_best_neighbour
gaiadr1.gaiadr1.sdss_dr9_neighbourhood
gaiadr1.gaiadr1.tmass_best_neighbour
gaiadr1.gaiadr1.tmass_neighbourhood
gaiadr1.gaiadr1.ucac4_best_neighbour
gaiadr1.gaiadr1.ucac4_neighbourhood
gaiadr1.gaiadr1.urat1_best_neighbour
gaiadr1.gaiadr1.urat1_neighbourhood
gaiadr1.gaiadr1.cepheid
gaiadr1.gaiadr1.phot_variable_time_series_gfov
gaiadr1.gaiadr1.phot_variable_time_series_gfov_statistical_parameters
gaiadr1.gaiadr1.rrlyrae
gaiadr1.gaiadr1.variable_summary
gaiadr1.gaiadr1.allwise_original_valid
gaiadr1.gaiadr1.gsc23_original_valid
gaiadr1.gaiadr1.ppmxl_original_valid
gaiadr1.gaiadr1.sdssdr9_original_valid
gaiadr1.gaiadr1.tmass_original_valid
gaiadr1.gaiadr1.ucac4_original_valid
gaiadr1.gaiadr1.urat1_original_valid
gaiadr1.gaiadr1.gaia_source
gaiadr1.gaiadr1.tgas_source
gaiadr2.gaiadr2.aux_allwise_agn_gdr2_cross_id
gaiadr2.gaiadr2.aux_iers_gdr2_cross_id
gaiadr2.gaiadr2.aux_sso_orbit_residuals
gaiadr2.gaiadr2.aux_sso_orbits
gaiadr2.gaiadr2.dr1_neighbourhood
gaiadr2.gaiadr2.allwise_best_neighbour
gaiadr2.gaiadr2.allwise_neighbourhood
gaiadr2.gaiadr2.apassdr9_best_neighbour
gaiadr2.gaiadr2.apassdr9_neighbourhood
gaiadr2.gaiadr2.gsc23_best_neighbour
gaiadr2.gaiadr2.gsc23_neighbourhood
gaiadr2.gaiadr2.hipparcos2_best_neighbour
gaiadr2.gaiadr2.hipparcos2_neighbourhood
gaiadr2.gaiadr2.panstarrs1_best_neighbour
gaiadr2.gaiadr2.panstarrs1_neighbourhood
gaiadr2.gaiadr2.ppmxl_best_neighbour
gaiadr2.gaiadr2.ppmxl_neighbourhood
gaiadr2.gaiadr2.ravedr5_best_neighbour
gaiadr2.gaiadr2.ravedr5_neighbourhood
gaiadr2.gaiadr2.sdssdr9_best_neighbour
gaiadr2.gaiadr2.sdssdr9_neighbourhood
gaiadr2.gaiadr2.tmass_best_neighbour
gaiadr2.gaiadr2.tmass_neighbourhood
gaiadr2.gaiadr2.tycho2_best_neighbour
gaiadr2.gaiadr2.tycho2_neighbourhood
gaiadr2.gaiadr2.urat1_best_neighbour
gaiadr2.gaiadr2.urat1_neighbourhood
gaiadr2.gaiadr2.sso_observation
gaiadr2.gaiadr2.sso_source
gaiadr2.gaiadr2.vari_cepheid
gaiadr2.gaiadr2.vari_classifier_class_definition
gaiadr2.gaiadr2.vari_classifier_definition
gaiadr2.gaiadr2.vari_classifier_result
gaiadr2.gaiadr2.vari_long_period_variable
gaiadr2.gaiadr2.vari_rotation_modulation
gaiadr2.gaiadr2.vari_rrlyrae
gaiadr2.gaiadr2.vari_short_timescale
gaiadr2.gaiadr2.vari_time_series_statistics
gaiadr2.gaiadr2.panstarrs1_original_valid
gaiadr2.gaiadr2.gaia_source
gaiadr2.gaiadr2.ruwe
gaiaedr3.gaiaedr3.gaia_source
gaiaedr3.gaiaedr3.agn_cross_id
gaiaedr3.gaiaedr3.commanded_scan_law
gaiaedr3.gaiaedr3.dr2_neighbourhood
gaiaedr3.gaiaedr3.frame_rotator_source
gaiaedr3.gaiaedr3.allwise_best_neighbour
gaiaedr3.gaiaedr3.allwise_neighbourhood
gaiaedr3.gaiaedr3.apassdr9_best_neighbour
gaiaedr3.gaiaedr3.apassdr9_join
gaiaedr3.gaiaedr3.apassdr9_neighbourhood
gaiaedr3.gaiaedr3.gsc23_best_neighbour
gaiaedr3.gaiaedr3.gsc23_join
gaiaedr3.gaiaedr3.gsc23_neighbourhood
gaiaedr3.gaiaedr3.hipparcos2_best_neighbour
gaiaedr3.gaiaedr3.hipparcos2_neighbourhood
gaiaedr3.gaiaedr3.panstarrs1_best_neighbour
gaiaedr3.gaiaedr3.panstarrs1_join
gaiaedr3.gaiaedr3.panstarrs1_neighbourhood
gaiaedr3.gaiaedr3.ravedr5_best_neighbour
gaiaedr3.gaiaedr3.ravedr5_join
gaiaedr3.gaiaedr3.ravedr5_neighbourhood
gaiaedr3.gaiaedr3.sdssdr13_best_neighbour
gaiaedr3.gaiaedr3.sdssdr13_join
gaiaedr3.gaiaedr3.sdssdr13_neighbourhood
gaiaedr3.gaiaedr3.skymapperdr2_best_neighbour
gaiaedr3.gaiaedr3.skymapperdr2_join
gaiaedr3.gaiaedr3.skymapperdr2_neighbourhood
gaiaedr3.gaiaedr3.tmass_psc_xsc_best_neighbour
gaiaedr3.gaiaedr3.tmass_psc_xsc_join
gaiaedr3.gaiaedr3.tmass_psc_xsc_neighbourhood
gaiaedr3.gaiaedr3.tycho2tdsc_merge_best_neighbour
gaiaedr3.gaiaedr3.tycho2tdsc_merge_neighbourhood
gaiaedr3.gaiaedr3.urat1_best_neighbour
gaiaedr3.gaiaedr3.urat1_neighbourhood
gaiaedr3.gaiaedr3.gaia_source_simulation
gaiaedr3.gaiaedr3.gaia_universe_model
gaiaedr3.gaiaedr3.tycho2tdsc_merge
public.public.hipparcos
public.public.hipparcos_newreduction
public.public.hubble_sc
public.public.igsl_source
public.public.igsl_source_catalog_ids
public.public.tycho2
public.public.dual
tap_config.tap_config.coord_sys
tap_config.tap_config.properties
tap_schema.tap_schema.columns
tap_schema.tap_schema.key_columns
tap_schema.tap_schema.keys
tap_schema.tap_schema.schemas
tap_schema.tap_schema.tables
In [10]:
tables = Gaia.load_tables(only_names=True)

job = Gaia.launch_job_async("SELECT * FROM gaiadr2.gaia_source \
WHERE CONTAINS(POINT('ICRS',gaiadr2.gaia_source.ra,gaiadr2.gaia_source.dec),CIRCLE('ICRS',315.40383,68.16327,0.2))=1 \
;", dump_to_file=False)
INFO: Retrieving tables... [astroquery.utils.tap.core]
INFO: Parsing tables... [astroquery.utils.tap.core]
INFO: Done. [astroquery.utils.tap.core]
INFO: Query finished. [astroquery.utils.tap.core]
In [11]:
g = job.get_results()
print (g['source_id', 'pmra', 'pmdec', 'parallax'])
     source_id              pmra                pmdec              parallax     
                          mas / yr             mas / yr              mas        
------------------- -------------------- ------------------- -------------------
2270057586519184000   -3.314622581114413  -4.281743275298246  0.6314800879434188
2270055898595769472    6.182300130469731 -1.3647752099072872  0.8524556736136708
2270050783290988544   -3.353645274649903  0.5101568552371537  0.5879406173492704
2270057689598399360    7.770011898936287 -1.4279546209333012  2.9612467088659393
2270057723958137600    8.311545713476313 -1.1525369764318092  2.9783726157791746
2270050405333867776   -4.653376260701559  -1.261989667505687  0.6022991620808252
2270051161248111616   -2.649757093788174 -0.6502715131143503  0.4682234132151094
2270049889937792128   -7.086115159247534  -3.383802393250095  1.0452762970385412
2270057414720493440   3.2674991560117506  -9.943934070024795  0.9118536565314175
2270055142681493120   -2.877894888624008 -0.2957082674549928  0.2231856330463733
                ...                  ...                 ...                 ...
2270245465569124608    7.222120692495878 -1.1544189291779094   2.941003769898466
2270239998073875840  -13.849924659932679  -12.30189152488327  2.9930915332533017
2270247527151637632 -0.07107170931121809 -1.0897323948051147  0.7774598211635257
2270248454866363904    2.335765528930543  0.4598610529067485 0.48768619234771476
2270248283067672448    2.818202193950412  -11.29898244603869  1.4606217642453116
2270243232185265280  0.46886827106516127 -1.8904725005011354  1.8598244661643795
2270245259410695936  -0.6257150554369184 -2.6695434083625798   0.455188319297458
2270251822117785088  -0.5753606593032558 -0.7027233097751351 -0.5686445317337526
2270247905108759168   -4.339715266962369  -7.547186164635502   1.260890161659583
2270240380326980864   -4.456422639948163  -6.469867830619474 -1.1142990848725984
Length = 1196 rows
In [12]:
# Plot the results in a proper motion plot of proper motion in RA (pmra) versus proper motion in DEC (pmdec) 
# in the range pmra [-20,20] and pmdec [-20,20]
plt.figure(figsize=(10, 8))
graph = plt.scatter(g['pmra'], g['pmdec'], alpha=0.9, c=g['parallax'], cmap=plt.cm.coolwarm)
cb = plt.colorbar(graph)
cb.set_label('parallax',fontsize=14)
#plt.scatter(g['pmra'], g['pmdec'],color='r',alpha=0.3)
plt.xlim(-20,20)
plt.ylim(-20,20)
plt.title('Gaia DR2 sources proper motion plot around HD 200775',fontsize=16)
plt.xlabel(r'pmRA',fontsize=14)
plt.ylabel(r'pmDEC',fontsize=14)

plt.show()
In [13]:
# Retrieve the Gaia parameters parallax, pmra and pmdec for HD 200775. From Vioque+ 2018 we know that 
# parallax = 2.770664
job2 = Gaia.launch_job_async("SELECT ra, dec, parallax, pmra, pmdec FROM gaiadr2.gaia_source \
WHERE CONTAINS(POINT('ICRS',gaiadr2.gaia_source.ra,gaiadr2.gaia_source.dec),CIRCLE('ICRS',315.40383,68.16327,0.2))=1 \
AND parallax BETWEEN 2.770660 AND 2.770670 ;", dump_to_file=False)
                             
r = job2.get_results()
print (r['dec', 'parallax', 'pmra', 'pmdec'])
INFO: Query finished. [astroquery.utils.tap.core]
       dec             parallax            pmra              pmdec       
       deg               mas             mas / yr           mas / yr     
----------------- ----------------- ----------------- -------------------
68.16326271415059 2.770663848935632 8.335537486577103 -1.5655783707565698
In [14]:
# Run a second asynchronous query on the Gaia archive, filtering the results by quality, proper motion and parallax:
job3 = Gaia.launch_job_async("SELECT * FROM gaiadr2.gaia_source as gaia \
INNER JOIN gaiadr2.ruwe \
ON gaia.source_id = gaiadr2.ruwe.source_id \
WHERE CONTAINS(POINT('ICRS',gaia.ra,gaia.dec),CIRCLE('ICRS',315.40383,68.16327,0.2))=1 \
AND gaia.phot_g_mean_mag < 19 \
AND gaia.parallax_over_error > 10 \
AND gaia.phot_g_mean_flux_over_error > 50 \
AND gaia.visibility_periods_used > 8 \
AND gaiadr2.ruwe.ruwe < 1.4 \
AND gaia.parallax BETWEEN 2 AND 3.5 \
AND gaia.pmra BETWEEN 5 AND 11 \
AND gaia.pmdec BETWEEN -4 AND 1;", dump_to_file=False)

candidates = job3.get_results() 
len(candidates)
INFO: Query finished. [astroquery.utils.tap.core]
Out[14]:
23
In [15]:
plt.figure(figsize=(10, 8))
plt.scatter(candidates['pmra'], candidates['pmdec'], s=40, edgecolor='g', facecolor='none')
graph = plt.scatter(g['pmra'], g['pmdec'], alpha=0.9, c=g['parallax'], cmap=plt.cm.coolwarm)
cb = plt.colorbar(graph)
cb.set_label('parallax',fontsize=14)
plt.scatter(candidates['pmra'], candidates['pmdec'], s=40, edgecolor='g', facecolor='none')
plt.xlim(-20,20)
plt.ylim(-20,20)
plt.title('Gaia DR2 sources proper motion plot around HD 200775',fontsize=16)
plt.xlabel(r'pmRA',fontsize=14)
plt.ylabel(r'pmDEC',fontsize=14)
plt.legend(["HD 200775 cluster candidates"])

plt.show()

Step 3. Query the Herschel archive

In [16]:
# Query ESASky for the available Herschel maps
maps = ESASky.query_object_maps(position='HD 200775', missions=['HERSCHEL'])
print (maps)
TableList with 1 tables:
	'0:HERSCHEL' with 15 column(s) and 9 row(s) 
In [17]:
# Inspect the table 
maps['HERSCHEL'].info
Out[17]:
<Table length=9>
        name         dtype    unit                     description                   
------------------- ------- ------- -------------------------------------------------
            dec_deg float64     deg                    Actual declination of pointing
           duration float64 seconds            Duration of the observation in seconds
           end_time  object                  The end date and time of the observation
             filter  object microns                            Filter or filters used
                fov  object                                             Field of view
         instrument  object                                   The Herschel instrument
     observation_id  object                  The identifier of a Herschel observation
    observation_oid   int32                                     Database index number
observing_mode_name  object                       Name of the Herschel observing mode
       postcard_url  object                  The URL to download the postcard preview
        product_url  object                           The URL to download the product
             ra_deg float64     deg                Actual right ascension of pointing
         start_time  object                The start date and time of the observation
              stc_s  object         Footprint of the observation in STC string format
        target_name  object                                    The name of the target
In [18]:
# Inspect the columns
maps['HERSCHEL']['observation_id', 'instrument', 'filter'].pprint()
observation_id instrument     filter   
                             microns   
-------------- ---------- -------------
    1342187077       PACS       70, 160
    1342197675       PACS      100, 160
    1342188653       PACS       70, 160
    1342187078       PACS       70, 160
    1342188652       PACS       70, 160
    1342188653      SPIRE 250, 350, 500
    1342188652      SPIRE 250, 350, 500
    1342183680      SPIRE 250, 350, 500
    1342197676       PACS      100, 160
In [19]:
# Download the images
maps_data = ESASky.get_maps(query_table_list=maps,missions='HERSCHEL')  
INFO: Starting download of HERSCHEL data. (9 files) [astroquery.esasky.core]
INFO: Downloading Observation ID: 1342187077 from http://archives.esac.esa.int/hsa/whsa-tap-server/data?RETRIEVAL_TYPE=STANDALONE&observation_oid=8583575&DATA_RETRIEVAL_ORIGIN=UI [astroquery.esasky.core]
INFO: [Done] [astroquery.esasky.core]
INFO: Downloading Observation ID: 1342197675 from http://archives.esac.esa.int/hsa/whsa-tap-server/data?RETRIEVAL_TYPE=STANDALONE&observation_oid=8586190&DATA_RETRIEVAL_ORIGIN=UI [astroquery.esasky.core]
INFO: [Done] [astroquery.esasky.core]
INFO: Downloading Observation ID: 1342188653 from http://archives.esac.esa.int/hsa/whsa-tap-server/data?RETRIEVAL_TYPE=STANDALONE&observation_oid=8634405&DATA_RETRIEVAL_ORIGIN=UI [astroquery.esasky.core]
INFO: [Done] [astroquery.esasky.core]
INFO: Downloading Observation ID: 1342187078 from http://archives.esac.esa.int/hsa/whsa-tap-server/data?RETRIEVAL_TYPE=STANDALONE&observation_oid=8583578&DATA_RETRIEVAL_ORIGIN=UI [astroquery.esasky.core]
INFO: [Done] [astroquery.esasky.core]
INFO: Downloading Observation ID: 1342188652 from http://archives.esac.esa.int/hsa/whsa-tap-server/data?RETRIEVAL_TYPE=STANDALONE&observation_oid=8634404&DATA_RETRIEVAL_ORIGIN=UI [astroquery.esasky.core]
INFO: [Done] [astroquery.esasky.core]
INFO: Downloading Observation ID: 1342188653 from http://archives.esac.esa.int/hsa/whsa-tap-server/data?RETRIEVAL_TYPE=STANDALONE&observation_oid=8618298&DATA_RETRIEVAL_ORIGIN=UI [astroquery.esasky.core]
INFO: [Done] [astroquery.esasky.core]
INFO: Downloading Observation ID: 1342188652 from http://archives.esac.esa.int/hsa/whsa-tap-server/data?RETRIEVAL_TYPE=STANDALONE&observation_oid=8618297&DATA_RETRIEVAL_ORIGIN=UI [astroquery.esasky.core]
INFO: [Done] [astroquery.esasky.core]
INFO: Downloading Observation ID: 1342183680 from http://archives.esac.esa.int/hsa/whsa-tap-server/data?RETRIEVAL_TYPE=STANDALONE&observation_oid=8617915&DATA_RETRIEVAL_ORIGIN=UI [astroquery.esasky.core]
INFO: [Done] [astroquery.esasky.core]
INFO: Downloading Observation ID: 1342197676 from http://archives.esac.esa.int/hsa/whsa-tap-server/data?RETRIEVAL_TYPE=STANDALONE&observation_oid=8586191&DATA_RETRIEVAL_ORIGIN=UI [astroquery.esasky.core]
INFO: [Done] [astroquery.esasky.core]
INFO: Downloading of HERSCHEL data complete. [astroquery.esasky.core]
INFO: Maps available at /Users/nalvarez/Documents/ESDC/astroquery/Maps. [astroquery.esasky.core]
In [20]:
# Inspection of the Herschel PACS 70um header
her_hdu = maps_data["HERSCHEL"][0]["70"]
her_hdu.info()
her_hdu[0].header
Filename: Maps/HERSCHEL/anonymous1629204001/hpacs_25HPPJSMAPB_blue_2102_p6809_00_v1.0_1470433023076.fits.gz
No.    Name      Ver    Type      Cards   Dimensions   Format
  0  PRIMARY       1 PrimaryHDU     284   ()      
  1  image         1 ImageHDU        52   (653, 706)   float64   
  2  coverage      1 ImageHDU        55   (653, 706)   float64   
  3  stDev         1 ImageHDU        55   (653, 706)   float64   
  4  History       1 ImageHDU        23   ()      
  5  HistoryScript    1 BinTableHDU     39   81R x 1C   [321A]   
  6  HistoryTasks    1 BinTableHDU     46   55R x 4C   [1K, 38A, 1K, 9A]   
  7  HistoryParameters    1 BinTableHDU     74   507R x 10C   [1K, 21A, 7A, 31A, 1L, 1K, 1L, 58A, 11A, 35A]   
Out[20]:
SIMPLE  =                    T / Java FITS: Fri Aug 05 21:24:38 CEST 2016       
BITPIX  =                   32                                                  
NAXIS   =                    0 / Dimensionality                                 
EXTEND  =                    T / May contain datasets                           
TIMESYS = 'UTC     '           / All dates are in UTC time                      
LONGSTRN= 'OGIP 1.0'           / The OGIP long string convention may be used.   
COMMENT This FITS file may contain long string keyword values that are          
COMMENT continued over multiple keywords.  This convention uses the  '&'        
COMMENT character at the end of a string which is then continued                
COMMENT on subsequent keywords whose name = 'CONTINUE'.                         
          ---------------Herschel FITS Data Generator---------------            
          This product is generated by Herschel software.                       
HCSS____=                    5 / HCSS Fits Product Version                      
          -------------- Herschel Structure Data--------------------            
          Following fields are private to the structure of the                  
          Java object this HDU is representing.                                 
CLASS___= 'herschel.ia.dataset.image.SimpleImage' / java representation         
INFO____= 'Photometry blue JScanam map'                                         
          -------------- Herschel Parameter Data--------------------            
          All actual parameter names are converted to FITS compliant            
          conventions. Note that the HIERARCH comments contain the              
          appropriate key mapping                                               
TYPE    = 'HPPJSMAPB'          / Product Type Identification                    
CREATOR = 'SPG v14.2.0'        / Generator of this product                      
DATE    = '2016-07-22T22:15:42.587000' / Creation date of this product          
DESC    = 'Photometry blue JScanam map' / Name of this product                  
INSTRUME= 'PACS    '           / Instrument attached to this product            
MODELNAM= 'FLIGHT  '           / Model name attached to this product            
DATE-OBS= '2009-11-18T18:33:59.471527' / Start date of the observation          
DATE_OBS= '2009-11-18T18:33:59.471527' / Start date of the observation          
DATE-END= '2009-11-18T19:54:54.347526' / End date of the observation            
FORMATV = '1.0     '           / Version of product format                      
DETROW  =                   32 / [] Number of detector rows                     
DETCOL  =                   64 / [] Number of detector columns                  
CAMNAME = 'Blue Photometer'    / Name of the Camera                             
RELTMOFF=                    0 / [] Offset btwn PACS internal CRDC counter an&  
COMMENT d on-board time                                                         
APID    =                 1156 / [] Application Programme Identifier            
SUBTYPE =                  2.0 / [] HSPOT: Product subtype: 1:BolRed 2:BolBlu&  
COMMENT e 3:SpecRed 4:SpecBlue                                                  
COMPVERS=                 13.0 / [] PACS compression algorithm version          
ALGONUM =                132.0 / [] PACS compression algorithm number           
ALGORITH= 'Floating Average  : 4' / PACS compression algorithm description      
COMPNUM =                  0.0 / [] PACS compression algorithm number           
COMPMODE= 'Photometry Default Mode' / PACS compression algorithm model          
DXID    =               4001.0 / [] HSPOT: Detector selection table identifier  
WAVELNTH=                 70.0 / [micrometer] Filter reference wavelength       
PRFSPUBF=                    0 / [] no. of red SPU buffers not decompressed d&  
COMMENT ue to corrupt data                                                      
PBFSPUBF=                    0 / [] no. of blue SPU buffers not decompressed &  
COMMENT due to corrupt data                                                     
SLICEKEY=                    T / PACS Slice Info keywords updated               
RMTIMSET=                    1 / [] Number of removed  Frames due to setTime &  
COMMENT command                                                                 
LEVEL   = '25      '           / Product level                                  
OBSTYPE =                    0 / [] Observation type                            
OBSCNT  =                    0 / [] Observation counter                         
CAMERA  = 'PHOTBLUE'           / Camera                                         
ODNUMBER=                  188 / [] Operational Day Number count                
CUSMODE = 'PacsPhoto'          / CUS observation mode                           
INSTMODE= 'PacsPhoto'          / Instrument Mode                                
OBS_MODE= 'Scan map'           / Observation mode name                          
PROCMODE= 'BULK_REPROCESSING'  / SPG pipeline processing mode selected          
OBSERVER= 'aabergel'           / Observer name                                  
PROPOSAL= 'SDP_aabergel_3'     / Proposal name                                  
POINTMOD= 'Line_scan'          / Pointing mode                                  
SLEWTIME= '2009-11-18T18:13:31.000000' / Scheduled start time of the slew       
ORIGIN  = 'Herschel Science Centre' / Site that created the product             
AOR     = 'PPhoto-ngc7023_135' / AOR Label as entered in HSpot                  
AOT     = 'Photometer'         / AOT Identifier                                 
EQUINOX =               2000.0 / [] Equinox of celestial coordinate system      
MISSIONC= 'MC_HPhase3_P34ASTR_S34ASTR_SDP' / Mission configuration              
OBJECT  = 'n7023_int'          / Target name                                    
RADESYS = 'ICRS    '           / Coordinate reference frame for the RA and DEC  
PMRA    =                  0.0 / [arcsec a-1] Target's proper motion, RA        
PMDEC   =                  0.0 / [arcsec a-1] Target's proper motion, Dec       
RA_NOM  =    315.4761029166666 / [deg] Requested Right Ascension of pointing    
DEC_NOM =    68.15971375000001 / [deg] Requested Declination of pointing        
RA      =    315.4771233200692 / [deg] Average Right Ascension of the centre &  
COMMENT of this image/cube                                                      
DEC     =    68.15802343811691 / [deg] Average Declination of the centre of t&  
COMMENT his image/cube                                                          
POSANGLE=   254.54535870744988 / [deg] Position Angle of pointing               
TELESCOP= 'Herschel Space Observatory' / Name of telescope                      
VELDEF  = 'RADI-LSR'           / The velocity definition and frame              
VFRAME  =    9.405152247978275 / [km s-1] Spacecraft velocity along the l-of-&  
COMMENT s of the telescope wrt the LSR: v / c = (lambda_rest - lambda) / lambda&
COMMENT _rest                                                                   
CALVERS = 'PACS_CAL_77_0'      / Version of calibration tree used               
OBSREQID=              1080177 / [] Observation Request Identifier              
OBREQVER=                    0 / [] Observation Request Version                 
TITLE   = 'PPhoto-ngc7023_135' / Title                                          
TARGET  = 'n7023_int'          / Target                                         
TARGTYPE= 'Fixed Single'       / Target Type                                    
SUB_INST= 'P_PHOT  '           / Sub Instrument                                 
CUS_MODE= 'PacsPhoto'          / Observing mode summary                         
OVERHEAD=                  180 / [] Overhead                                    
TSLEWMIN=                   59 / [] Minimum slew time                           
SCANHC  =                    F / HSPOT: scan map homogeneous coverage selected  
SCANSQ  =                    F / HSPOT: scan map square coverage selected       
FLUXEXTB=                  0.0 / [mJy] HSPOT: extended source flux estimate b&  
COMMENT lue                                                                     
FLUXEXTR=                  0.0 / [mJy] HSPOT: extended source flux estimate r&  
COMMENT ed                                                                      
FLUXPNTB=                  0.0 / [mJy] HSPOT: point source flux estimate blue   
FLUXPNTR=                  0.0 / [mJy] HSPOT: point source flux estimate red    
SCANGLE =                135.0 / [deg] HSPOT: scan map position angle           
SCANCOFR=                  0.0 / [deg] HSPOT: scan map constraint angle from    
SCANCOTO=                360.0 / [deg] HSPOT: scan map constraint angle to (d&  
COMMENT eg)                                                                     
SCANCRSC=                 15.0 / [arcsec] HSPOT: scan map leg separation        
SCANLEGL=                 10.0 / [arcmin] HSPOT: scan map leg length            
SCANLEGN=                   41 / [] HSPOT: number of scan map legs              
DPNAIFID=                    0 / [] SSO NAIF identifier (DEPRECATED: use naif&  
COMMENT Id instead)                                                             
REPNUM  =                    1 / [] HSPOT: number of map repetition             
BLUEBAND= 'blue1&  '                                                            
CONTINUE  '' / &                                                                
COMMENT HSPOT: PACS blue filter selection (values blue1 or blue2)               
SCANAREF= 'inst    '           / HSPOT: scan map reference (sky or inst)        
SCANSP  = 'medium  '           / HSPOT: scan map rate (high, medium or low)     
SOURCE  = 'largeScan'          / pointing mode: point: single, large: mapping   
ODSTART = '2009-11-17T20:07:20.000000' / Operational Day start time             
MISSCONV= 'FM_0.80 '           / Mission Configuration version                  
INSTCONF= 'FM_0.80 '           / Instrument Configuration                       
BOLVDB1 =   2.6024314561043136 / [] Bias blue group 1                           
BOLVUB1 =                    T / Bias blue Voltage Up group 1                   
BOLVDB2 =    2.602490454947204 / [] Bias blue group 2                           
BOLVUB2 =                    T / Bias blue Voltage Up group 2                   
BOLVDB3 =   2.6044063305183567 / [] Bias blue group 3                           
BOLVUB3 =                    T / Bias blue Voltage Up group 3                   
BOLVDB4 =   2.6018533294639434 / [] Bias blue group 4                           
BOLVUB4 =                    T / Bias blue Voltage Up group 4                   
BOLVDR1 =    2.001782534619588 / [] Bias red group 1                            
BOLVUR1 =                    T / Bias red Voltage Up group 1                    
BOLVDR2 =   2.0019227382010847 / [] Bias red group 2                            
BOLVUR2 =                    T / Bias red Voltage Up group 2                    
GAIN    = 'High    '           / Photometer Gain                                
PHOTMODE= 'Sbolo-Only'         / Bolometer readout mode                         
SCANVELO=                 20.0 / [arcsec s-1] HSPOT: Nominal scanning velocity  
SAAMEAN =    104.7151231953435 / [deg] averaged Solar Aspect Angle              
SAARMS  =  0.06019189834629477 / [deg] standard deviation of the Solar Aspect&  
COMMENT ~Angle                                                                  
SLICENUM=                    0 / [] Slice number                                
ISINTERL=                    F / Startracker mode                               
PRODNOTE= 'PACS photometer pipeline Level 2.5 product' / Product notes          
BNDRADEC= 'BS      '           / Band used in PhotAssignRaDec                   
IBPSCGLT=  0.14982146080082867 / [] Percentage of blue photometer deglitched &  
COMMENT pixels in science blocks above threshold                                
OBSID001=           1342187077 / [] Observation which contributed to this pro&  
COMMENT duct                                                                    
OBSID002=           1342187078 / [] Observation which contributed to this pro&  
COMMENT duct                                                                    
MAPPER  = 'JScanam '           / Mapper used to generate this product           
PIXFRAC =                  0.1 / [] Pixel drop fraction used in the final pro&  
COMMENT jection                                                                 
PIXSIZE =                  1.6 / [arcsec] Output pixel size used in the final&  
COMMENT ~projection                                                             
JSGALAC =                    T / JScaman optional parameter: galactic           
FILENAME= 'hpacs_25HPPJSMAPB_blue_2102_p6809_00_v1.0&'                          
CONTINUE  '' / &                                                                
COMMENT FITS filename for this product                                          
HIERARCH  key.TYPE='type'                                                       
HIERARCH  key.CREATOR='creator'                                                 
HIERARCH  key.DATE='creationDate'                                               
HIERARCH  key.DESC='description'                                                
HIERARCH  key.INSTRUME='instrument'                                             
HIERARCH  key.MODELNAM='modelName'                                              
HIERARCH  key.DATE-OBS='startDate'                                              
HIERARCH  key.DATE-END='endDate'                                                
HIERARCH  key.FORMATV='formatVersion'                                           
HIERARCH  key.DETROW='detRow'                                                   
HIERARCH  key.DETCOL='detCol'                                                   
HIERARCH  key.CAMNAME='camName'                                                 
HIERARCH  key.RELTMOFF='relTimeOffset'                                          
HIERARCH  key.APID='apid'                                                       
HIERARCH  key.SUBTYPE='subType'                                                 
HIERARCH  key.COMPVERS='compVersion'                                            
HIERARCH  key.ALGONUM='algoNumber'                                              
HIERARCH  key.ALGORITH='algorithm'                                              
HIERARCH  key.COMPNUM='compNumber'                                              
HIERARCH  key.COMPMODE='compMode'                                               
HIERARCH  key.DXID='dxid'                                                       
HIERARCH  key.WAVELNTH='wavelength'                                             
HIERARCH  key.PRFSPUBF='phot_red_FailedSPUBuffer'                               
HIERARCH  key.PBFSPUBF='phot_blue_FailedSPUBuffer'                              
HIERARCH  key.SLICEKEY='pacsSliceInfoUpdated'                                   
HIERARCH  key.RMTIMSET='RemovedSetTime'                                         
HIERARCH  key.LEVEL='level'                                                     
HIERARCH  key.OBSTYPE='obsType'                                                 
HIERARCH  key.OBSCNT='obsCount'                                                 
HIERARCH  key.CAMERA='camera'                                                   
HIERARCH  key.ODNUMBER='odNumber'                                               
HIERARCH  key.CUSMODE='cusMode'                                                 
HIERARCH  key.INSTMODE='instMode'                                               
HIERARCH  key.OBS_MODE='obsMode'                                                
HIERARCH  key.PROCMODE='processingMode'                                         
HIERARCH  key.OBSERVER='observer'                                               
HIERARCH  key.PROPOSAL='proposal'                                               
HIERARCH  key.POINTMOD='pointingMode'                                           
HIERARCH  key.SLEWTIME='slewTime'                                               
HIERARCH  key.ORIGIN='origin'                                                   
HIERARCH  key.AOR='aorLabel'                                                    
HIERARCH  key.AOT='aot'                                                         
HIERARCH  key.EQUINOX='equinox'                                                 
HIERARCH  key.MISSIONC='missionConfig'                                          
HIERARCH  key.OBJECT='object'                                                   
HIERARCH  key.RADESYS='raDeSys'                                                 
HIERARCH  key.PMRA='pmRA'                                                       
HIERARCH  key.PMDEC='pmDEC'                                                     
HIERARCH  key.RA_NOM='raNominal'                                                
HIERARCH  key.DEC_NOM='decNominal'                                              
HIERARCH  key.RA='ra'                                                           
HIERARCH  key.DEC='dec'                                                         
HIERARCH  key.POSANGLE='posAngle'                                               
HIERARCH  key.TELESCOP='telescope'                                              
HIERARCH  key.VELDEF='velocityDefinition'                                       
HIERARCH  key.VFRAME='radialVelocity'                                           
HIERARCH  key.CALVERS='calVersion'                                              
HIERARCH  key.OBSREQID='obsRequestId'                                           
HIERARCH  key.OBREQVER='obsRequestVersion'                                      
HIERARCH  key.TITLE='title'                                                     
HIERARCH  key.TARGET='target'                                                   
HIERARCH  key.TARGTYPE='targetType'                                             
HIERARCH  key.SUB_INST='subinstrument'                                          
HIERARCH  key.CUS_MODE='observingMode'                                          
HIERARCH  key.OVERHEAD='overhead'                                               
HIERARCH  key.TSLEWMIN='tslewmin'                                               
HIERARCH  key.SCANHC='mapScanHomCoverage'                                       
HIERARCH  key.SCANSQ='mapScanSquare'                                            
HIERARCH  key.FLUXEXTB='fluxExtBlu'                                             
HIERARCH  key.FLUXEXTR='fluxExtRed'                                             
HIERARCH  key.FLUXPNTB='fluxPntBlu'                                             
HIERARCH  key.FLUXPNTR='fluxPntRed'                                             
HIERARCH  key.SCANGLE='mapScanAngle'                                            
HIERARCH  key.SCANCOFR='mapScanConstrFrom'                                      
HIERARCH  key.SCANCOTO='mapScanConstrTo'                                        
HIERARCH  key.SCANCRSC='mapScanCrossScan'                                       
HIERARCH  key.SCANLEGL='mapScanLegLength'                                       
HIERARCH  key.SCANLEGN='mapScanNumLegs'                                         
HIERARCH  key.DPNAIFID='naifid'                                                 
HIERARCH  key.REPNUM='repFactor'                                                
HIERARCH  key.BLUEBAND='blue'                                                   
HIERARCH  key.SCANAREF='mapScanAngleRef'                                        
HIERARCH  key.SCANSP='mapScanSpeed'                                             
HIERARCH  key.SOURCE='source'                                                   
HIERARCH  key.ODSTART='odStartTime'                                             
HIERARCH  key.MISSCONV='missionConfiguration'                                   
HIERARCH  key.INSTCONF='instrumentConfiguration'                                
HIERARCH  key.BOLVDB1='BOL_VD_B_1'                                              
HIERARCH  key.BOLVUB1='BOL_VU_B_1'                                              
HIERARCH  key.BOLVDB2='BOL_VD_B_2'                                              
HIERARCH  key.BOLVUB2='BOL_VU_B_2'                                              
HIERARCH  key.BOLVDB3='BOL_VD_B_3'                                              
HIERARCH  key.BOLVUB3='BOL_VU_B_3'                                              
HIERARCH  key.BOLVDB4='BOL_VD_B_4'                                              
HIERARCH  key.BOLVUB4='BOL_VU_B_4'                                              
HIERARCH  key.BOLVDR1='BOL_VD_R_1'                                              
HIERARCH  key.BOLVUR1='BOL_VU_R_1'                                              
HIERARCH  key.BOLVDR2='BOL_VD_R_2'                                              
HIERARCH  key.BOLVUR2='BOL_VU_R_2'                                              
HIERARCH  key.GAIN='PACS_PHOT_GAIN'                                             
HIERARCH  key.PHOTMODE='PACS_PHOT_MODE'                                         
HIERARCH  key.SCANVELO='mapScanVelocity'                                        
HIERARCH  key.SAAMEAN='solarAspectAngleMean'                                    
HIERARCH  key.SAARMS='solarAspectAngleRms'                                      
HIERARCH  key.SLICENUM='sliceNumber'                                            
HIERARCH  key.ISINTERL='isInterlaced'                                           
HIERARCH  key.PRODNOTE='productNotes'                                           
HIERARCH  key.BNDRADEC='bandUsedForRaDec'                                       
HIERARCH  key.IBPSCGLT='infoPhotBlueGlitchRate'                                 
HIERARCH  key.OBSID001='obsid001'                                               
HIERARCH  key.OBSID002='obsid002'                                               
HIERARCH  key.MAPPER='mapper'                                                   
HIERARCH  key.PIXFRAC='pixfrac'                                                 
HIERARCH  key.PIXSIZE='pixSize'                                                 
HIERARCH  key.JSGALAC='jsGalac'                                                 
HIERARCH  key.FILENAME='fileName'                                               
          -----------------Dataset Children-------------------------            
          Below you will find all HDU locations that are children of            
          this composite dataset.                                               
DSETS___=                    4 / Number of datasets                             
DS_0    =                    1 / HDU of Child Dataset                           
DS_1    =                    2 / HDU of Child Dataset                           
DS_2    =                    3 / HDU of Child Dataset                           
DS_3    =                    4 / HDU of Child Dataset                           

Step 4. Overlay the Gaia sources on the Herschel image

In [21]:
# Overlaying the Gaia sources on the Herschel image
her_image = her_hdu['image'].data
norm = ImageNormalize(her_image,interval = ManualInterval(-0.05,0.3)) #play around with the ManualInterval numbers to change the image contrast

fig = plt.figure(figsize=(10,10),dpi=100)    
wcs_h = WCS(her_hdu['image'].header)
ax = fig.add_subplot(111,projection=wcs_h)
ax.set_title("HD 200775 region in Herschel PACS 70 µm")
ax.imshow(her_image,cmap=plt.cm.copper,origin='lower',interpolation='nearest', norm=norm)
p1 = ax.scatter(g['ra'],g['dec'],transform=ax.get_transform('world'), \
               s=30, edgecolor='#1E90FF', facecolor='none', label='Gaia DR2 sources')
p2 = ax.scatter(candidates['ra'],candidates['dec'],transform=ax.get_transform('world'), \
               s=60, edgecolor='#00ff00', facecolor='none', label='HD 200775 cluster candidates')
ax.set_xlabel("RA")
ax.set_ylabel("Dec")
ax.legend(["Gaia DR2 sources","HD 200775 cluster candidates"])
Out[21]:
<matplotlib.legend.Legend at 0x7fefb4710e80>