示例#1
0
def set_master_dir(redux_path, spectrograph, par):
    """
    Set the master directory auto-magically

    Args:
        redux_path: str or None
        spectrograph: Spectrograph or None
        par: ParSet or None

    Returns:
        master_dir : str
          Path of the MasterFrame directory

    """
    # Parameters
    if par is None:
        tmppar = pypeitpar.CalibrationsPar()
    else:
        if 'caldir' not in par.keys():
            tmppar = pypeitpar.CalibrationsPar()
        else:
            tmppar = par
    # Redux path
    if redux_path is None:
        redux_path = os.getcwd()
    master_dir = os.path.join(redux_path, tmppar['caldir'])
    # Spectrograph
    if spectrograph is not None:
        master_dir += '_'+spectrograph.spectrograph
    # Return
    return master_dir
示例#2
0
def test_calibrations():
    pypeitpar.CalibrationsPar()