from astroquery.mast.missions import MastMissions """ Used to pull the list of observations that fit our filter criteria from online Hubble archives. See all filter details in the function call below. sci_spec_1234='F606W,F606W;*,*;F606W,*;F606W;*' We are only pulling observations which have used the F606W filter, which is one of the most commonly used ACS filters. We need the regex strings because observations that used multiple filters will include all filters in a list. Documented at https://etc.stsci.edu/etcstatic/users_guide/appendix_b_acs.html sci_aec='S' This value denotes that we are searching only for science observations, not observations that were done in order to calibrate various parts of the instrument or imaging process. sci_instrume='acs' sci_instrument_config='ACS/WFC' Here, we define that we want data from the ACS/WFC instrument. sci_expflag='NORMAL' This is a quality flag, ensuring that no quality issues were flagged for this observation. sci_actual_duration='>300' We require the minimum total observation duration to be at least 300 seconds, to remove any faulty observations that may have ended after a short period of time and to further narrow the distribution of data away from edge cases. sci_aper_1234='WFC,WFC1,WFC2,WFCENTER' We require that the aperture be one of the standard apertures, documented at https://hst-docs.stsci.edu/acsihb/chapter-7-observing-techniques/7-7-acs-apertures """ missions = MastMissions(mission='hst') # Use query_criteria method to use selected form search conditions for making missions_mast search API call results = missions.query_criteria(select_cols=[ 'sci_aec', 'ang_sep', 'sci_aper_1234', 'sci_archive_class', 'sci_archive_date', 'sci_asn_id', 'sci_bandwidth', 'sci_broad_category', 'sci_central_wavelength', 'sci_costar_deploy', 'sci_data_set_name', 'sci_dec', 'sci_dec_v1', 'sci_dispersion', 'sci_ecliptic_latitude', 'sci_ecliptic_longitude', 'sci_expflag', 'sci_actual_duration', 'sci_fgslock', 'sci_spec_1234', 'sci_fov_config', 'sci_galactic_latitude', 'sci_galactic_longitude', 'sci_generation_date', 'sci_hapnum', 'sci_haspnum', 'sci_hlsp', 'sci_instrume', 'sci_instrument_config', 'sci_mtflag', 'sci_obs_type', 'sci_obset_id', 'sci_obsnum', 'sci_operating_mode', 'sci_pa_aper', 'sci_pi_last_name', 'sci_pixel_res', 'sci_preview_name', 'sci_program_id', 'sci_pep_id', 'sci_ra', 'sci_ra_v1', 'sci_refnum', 'sci_release_date', 'scp_scan_type', 'sci_spectral_res', 'sci_spectrum_end', 'sci_spectrum_start', 'sci_start_time', 'sci_status', 'sci_stop_time', 'sci_sun_alt', 'sci_target_descrip', 'sci_targname', 'sci_v3_pos_angle'], sci_spec_1234='F606W,F606W;*,*;F606W,*;F606W;*', sci_aec='S', sci_instrume='acs', sci_instrument_config='ACS/WFC', sci_expflag='NORMAL', sci_actual_duration='>300', sci_aper_1234='WFC,WFC1,WFC2,WFCENTER', limit=25000 ) df = results.to_pandas() print(len(df)) df.to_csv('hst_FINAL.csv')