hop package¶
Subpackages¶
- hop.distortion_correction package
- hop.hexabundle_allocation package
- Subpackages
- hop.hexabundle_allocation.general_operations package
- hop.hexabundle_allocation.hector package
- hop.hexabundle_allocation.problem_operations package
- Subpackages
- Submodules
- hop.hexabundle_allocation.problem_operations.extract_data module
- hop.hexabundle_allocation.problem_operations.fibres module
- hop.hexabundle_allocation.problem_operations.file_arranging module
- hop.hexabundle_allocation.problem_operations.hexabundle module
- hop.hexabundle_allocation.problem_operations.offsets module
- hop.hexabundle_allocation.problem_operations.plots module
- hop.hexabundle_allocation.problem_operations.position_ordering module
- hop.hexabundle_allocation.problem_operations.robot_parameters module
- Module contents
- Submodules
- hop.hexabundle_allocation.AyoanPC_main_hexabundleAllocation module
- hop.hexabundle_allocation.allocate_hexabundles module
- hop.hexabundle_allocation.collision_hexabundle_main module
- Module contents
- Subpackages
- hop.misc package
- hop.scripts package
- hop.target_selection package
- Submodules
- hop.target_selection.HectorSim module
HectorSimHectorSim.Taipan_Selection()HectorSim.cumulative_fraction_sample_imaged_to_2Re()HectorSim.cumulative_percentage_galaxies_imaged_2Re()HectorSim.general_selection()HectorSim.get_qz_pz()HectorSim.make_Julias_plot()HectorSim.plot_IFU_needed_for_2Re_hist()HectorSim.plot_IFU_needed_for_2Re_kde()HectorSim.plot_Mstar_z_gi_colour()HectorSim.plot_Re_hist()HectorSim.plot_SB_Re()HectorSim.plot_SB_hist()HectorSim.plot_cumulative_fraction_imaged_vs_bundle_diameter()HectorSim.plot_ellipticity_hist()HectorSim.plot_gmi_hist()HectorSim.plot_mass_hist()HectorSim.plot_parent_sample()HectorSim.plot_percentage_galaxy_sample_imaged_2Re()HectorSim.plot_selected_sample_MZ()HectorSim.plot_selected_sample_MZ_colour_Re()HectorSim.plot_z_Re()HectorSim.plot_z_hist()HectorSim.qz_function()HectorSim.sami_stepfunc()
add_boxes_to_Mstar_z()calculate_SB_at_R()load_table()safe_div()sparse_select_flat_in_Mass()
- Module contents
- hop.tiling package
- Submodules
- hop.tiling.tiling_functions module
calculate_completeness_stats()check_if_in_fov()find_clashes()find_great_circle_distance()find_nearest()get_best_tile_centre_dengreedy()get_best_tile_centre_greedy()make_best_tile()noclash()plot_survey_completeness_and_tile_positions()plot_tile()save_guide_text_file()save_tile_outputs()save_tile_text_file()select_stars_for_tile()select_targets()
- Module contents
Submodules¶
hop.pipeline module¶
- class hop.pipeline.HectorPipe(config_filename=None, Profit_files_location=None, config_dictionary=None, P_and_Q_offset_filename='Hexa_final_prism_gluing_PQ_table.xlsx')[source]¶
Bases:
objectThe Hector Observations pipeline. This class has methods to:
Use the Survey Simulator to create an input catalogue from a larger master catalogue
Tile an input catalogue using the Hector tiling code
Apply distortion correction to each tile
Configure each tile
Run the HexabundleAllocation code
- allocate_hexabundles_for_single_tile(fileNameGuides, fileNameHexa, robot_temperature, obs_temperature, plot=False)[source]¶
- apply_distortion_correction(tile_out_fname, guide_tile_out_fname, tile_out_fname_after_DC, guide_tile_out_fname_after_DC, tile_RA, tile_Dec, guide_stars_for_tile, verbose=False, plot_save_filename=None, date='', robot_temp=12, obs_temp=12, label='test_label', plateID='test_plateID', distortion_file='', linearity_file='', sky_fibre_file='', profit_file_dir='', check_sky_fibres=True, turn_off_linearity=False, rot_matrix='', apply_PM_corr=True, debug_levels=None)[source]¶
Take a tile file from the tiling process and apply Keith’s distortion correction code. Then turn his one output file into the two output files which Caro’s configuration code expects. We also need to do some work to edit the headers/etc.
If plot_save_filename is not None, save an image of the tile before/after the correction is applied
- find_premade_tiles()[source]¶
Find any tiles which have already been configured in the output folders.
- load_input_catalogue()[source]¶
Load an input target catalogue, guide star catalogue and standard star catalogue
- make_output_file_for_Tony(tile_file, robot_file)[source]¶
Take our output files and make them into a format which Tony can read in. This means:
‘#’ is reserved for a comment. Header key/value pairs should not start with a #, but the row names (which are only included for readability, Tony’s code doesn’t use them) should
Missing values should be blank- i.e. na_rep=’’
things which are specified as an integer must be made an integer, not a floating point number
- run_configuration_code(tile_file_for_configuration, guide_tile_for_configuration, configuration_output_filename, configuration_guide_filename, configuration_plot_filename, config_timeout, log=True, print_output=False)[source]¶
- show_skyfibreChanges_and_magnetCountPerAnnuli(tile_fname_1=None, tile_fname_2=None, tile_1_guide=None, tile_2_guide=None, tile_batch=None, tileBatch_count=None, tileBatch_skyFibreChange='OFF')[source]¶
- FUNCTION TO SHOW CHANGES IN SKYFIBRE SUB-PLATE NUMBERS AND MAGNET COUNT CHECK PERFORMED BETWEEN TWO TILES
TWO OPTIONS TO RUN THIS FUNCTION
- INPUTS FOR OPTION 1: ‘tile_number_1’ and ‘tile_number_2’
Produces the plots for the first tile and the second tile with changes in skyfibre sub-plate number of second tile compared to first tile being highlighted, and conducts magnet count check per annulus to record any warnings of magnet count in any annulus exceeding the available number of casings on text file.
- INPUTS FOR OPTION 2: ‘tile_batch’ and ‘tileBatch_count’
‘tileBatch_skyFibreChange’ - set as ‘ON’ to generate a full set of sky fibre change plots Carries out a magnet count check for each tile pair in a whole batch without any repeats and generates histogram plots for each annulus to show distribution of magnets count for each annulus in a batch. ‘tileBatch_skyFibreChange’ is OFF by default, and if set to ON will also produce a full set of sky fibre change plots for each tile pair in batch.
- tile_field(configure_tiles=True, apply_distortion_correction=True, plot=True, config_timeout=None, use_galaxy_priorities=True, robot_temperature=12, obs_temperature=12, label='a test_label', plateID='a test_plateID', date='2022 10 27', check_sky_fibres=True)[source]¶
Tile an entire input catalogue. Optionally apply distortion correction to go from RA/DEC to locations on the plate and optionally run the configuration code to arrange the hexabundles on the plate.