autowisp.astrometry.astrometry_max_mag_estimate module

Class Inheritance Diagram

Inheritance diagram of ArgumentParser, DataReductionFile, DefaultsFormatter, Interpreter, SkyCoord, cKDTree

Find the appropriate astrometry-catalog-max-magnitude based on the flux threshold

autowisp.astrometry.astrometry_max_mag_estimate.main()[source]

Main function to run the astrometry matching process.

autowisp.astrometry.astrometry_max_mag_estimate.match_sources(field_corr, dr_df)[source]

Match sources from the corr file with the DR file using a KDTree.

Parameters:
  • field_corr (np.ndarray) – Initial correlation data from astrometry.net.

  • dr_df (pd.DataFrame) – DataFrame containing the extracted sources from

  • file. (the DR)

Returns:

DataFrame containing the matched sources. n_extracted (int): Number of extracted sources.

Return type:

corr_df (pd.DataFrame)

autowisp.astrometry.astrometry_max_mag_estimate.parse_command_line()[source]

Return the parsed command line arguments.

autowisp.astrometry.astrometry_max_mag_estimate.query_gaia(corr_matched, n_extracted, image_scale_factor, frame_fov_estimate=None, image_margin=1.1)[source]

Query Gaia DR3 catalog for sources matching the extracted sources.

Parameters:
  • corr_matched (pd.DataFrame) – DataFrame containing the matched sources.

  • n_extracted (int) – Number of extracted sources from the DR file.

  • image_scale_factor (float) – A safety factor originally to account for solving astrometry in a range of fov/factor to fov*factor.

  • frame_fov_estimate (tuple, optional) – Estimated field of view of the frame.

Returns:

DataFrame containing the matched

sources sorted by magnitude with Gaia phot_g_mean_mag.

Return type:

corr_matched_sorted (pd.DataFrame)

autowisp.astrometry.astrometry_max_mag_estimate.read_dr_file(dr_path, cmdline_args)[source]

Read DR file and solve the initial astrometry for it.

Parameters:
  • dr_path (str) – Path to the data reduction file.

  • cmdline_args (dict or Namespace) – Command line arguments or a

  • parameters. (dictionary of configuration)

Returns:

Initial correlation data from astrometry.net. dr_df (pd.DataFrame): DataFrame containing the extracted sources from the DR file.

Return type:

field_corr (np.ndarray)