qumas.LensmodelWrapper.utils module

write_list_to_file(file_path, data_lines)[source]

Write the content of a list to a file.

Parameters:
  • file_path (str) – Path to the file to save.

  • data_lines (list of str) – Lines to write to the file.

clean_number(txt)[source]
bands_that_can_be_modeled(L, print_bands=False, keyword='IS')[source]

given a panda data frame for and unique object choose the best band for our experiment e.g. I/F814/i

Parameters:

L (pandas.DataFrame)

can_be_modeled(L, keywords=['IS', 'lens'], to_pandas=True)[source]

cbm:can be modeled ? given a panda data frame for and unique object

Parameters:

L (pandas.DataFrame)

columns_to_float(system, band)[source]
is_know_redshift(Lenses)[source]

Given a data frame of lens system look for redshift in the system in the current table and replace - for 0.5 or 2.0

Parameters:

Lenses (pandas.DataFrame)

model_available(imagenes, dif)[source]
Parameters:
  • imagenes (float)

  • dif (float)

image_whit_photometry(L, verbose=False)[source]
Parameters:

L (pandas.DataFrame)

pandas_to_model(Lenses, verbose=False, only_astrometry=False)[source]
Parameters:

Lenses (pandas.DataFrame)

get_paths_before(target_path)[source]
make_dictionary(list, prefix='p')[source]
get_numeric_values(text)[source]
get_images_result(list_lensmodel)[source]
get_kappa_gamma(list_of_lines)[source]
get_result_lensmodel(list_of_lines)[source]
get_critical_caustic(list_of_lines)[source]
get_grid(list_of_lines)[source]
get_RE(list_of_lines)[source]
full_modeling_result(modeling_path, model_setup, remove_files=True)[source]
compare_dicts(dict1, dict2)[source]
read_pickle(file_path)[source]
write_pickle(data, file_path)[source]
exception ModelNotFoundError(model, available_models)[source]

Bases: Exception