ecpi.common package

generic classes, functions. Could be used by other projects.

Subpackages:

Summary

Reference

class DirForTest(p_module_path)[source]

Bases: object

create output directory with same path than test module

is_file(p_file)[source]

Returns if p_file file exists in ref path. :param p_module: path of module :param p_file: path of file

rm_all()[source]

remove all files

rm_all_fits()[source]

remove all FITS files

add_path_caldb_eclairs(p_file)[source]

add to p_file the path of the CalDB directory.

Returns

absolute path of p_file

Return type

string

add_path_current_module(p_module, p_file)[source]

function to define a path :param p_module: path of module, ie __file__ :param p_file: path of file

Returns

a path at the same level that p_module

Return type

string

add_path_data_ref_eclairs(p_file)[source]

add to p_file the path of the ECLAIRs data simulation or analysis directory.

Returns

absolute path of p_file

Return type

string

add_path_home_eclairs(p_file)[source]

add to p_file the path of the ECLAIRs directory.

Returns

absolute path of p_file

Return type

string

add_path_output_eclairs(p_file)[source]

add to p_file the path of the ECLAIRs output directory.

The ECLAIRs output directory is ECLAIRs/OUTPUT. It is a non commited directory.

Returns

absolute path of p_file

Return type

string

add_path_process_eclairs(p_file)[source]

add to p_file the path of the ECLAIRs processing directory.

The ECLAIRs test directory is ECLAIRs/DATA_PROCESS. It is a non committed directory.

Returns

absolute path of p_file

Return type

string

add_path_root_eclairs(p_file)[source]

add to p_file the path of the ECLAIRs directory.

Returns

absolute path of p_file

Return type

string

add_path_tests_eclairs(p_file)[source]

add to p_file the path of the ECLAIRs test directory.

The ECLAIRs test directory is ECLAIRs/DATA_TEST. It is a non committed directory.

Returns

absolute path of p_file

Return type

string

get_caldb_dir()[source]

get the path of the ECLAIRs directory.

Returns

path of the root of the ECLAIRs directory

Return type

string

get_home_eclairs()[source]

get the path of the ECPI_HOMEs directory.

Returns

path of the home of the ECLAIRs directory

Return type

string

get_path_associated_test()[source]

add to p_file the path of the ECLAIRs output directory.

The ECLAIRs output directory is ECLAIRs/OUTPUT. It is a non committed directory.

Returns

absolute path of p_file

Return type

string

get_path_pipeline()[source]

gets the path of the pipeline’s home directory. :return: absolute path to pipeline’s folder :rtype: string

get_root_eclairs()[source]

get the path of the ECLAIRs directory.

Returns

path of the root of the ECLAIRs directory

Return type

string