threadcount.procedures.open_cube_and_deredshift.run¶
- threadcount.procedures.open_cube_and_deredshift.run(user_settings)[source]¶
Open a fits data cube and de-redshift it, as well as any continuum cube.
The data and variance files are combined into a single cube, and the continuum file (if available) is kept separate. An interactive tweak redshift procedure may be activated, if tweak_redshift is True.
New dict keys are added to the user_settings and returned, with user_settings[‘comment’] having comments appended to it.
- Parameters:
user_settings (dict) –
required keys:
”data_filename”: str, filename of data cube.
”z”: float, estimation of object redshift.
optional keys:
”data_hdu_index”: int, index of the data hdu. Default None – mpdaf will attempt to guess.
”var_filename”: str, filename of the variance cube. Default None.
”var_hdu_index”: int, index of the variance hdu. Default None – mpdaf will attempt to guess.
”continuum_filename”: str, filename of the variance cube. Default None.
”tweak_redshift”: bool, run interactive tweak redshift. Default False.
”tweak_redshift_line”: threadcount.lines.Line, the Line object to use for the tweak redshift function. Default: tc.lines.L_OIII5007
”comment”: str, default “”. Any comment to add to the header of saved files.
- Returns:
dict : an updated settings dictionary. Cube : the data cube Cube 2 : the continuum cube, if continuum filename given, otherwise None.
- Return type:
(dict,
mpdaf.obj.Cube,mpdaf.obj.Cubeor None)
Examples
>>> from threadcount.procedures import open_cube_and_deredshift >>> my_settings = { ... "data_filename": "MRK1486_red_metacube.fits", ... "z": 0.0339, ... } >>> my_settings = open_cube_and_deredshift.run(my_settings) >>> # examine my_settings to see the information added. >>> cube = my_settings["cube"]