PetrosianCorrection

class petrofit.petrosian.PetrosianCorrection(grid, enforce_range=True)[source]

Bases: object

This class computes corrections for Petrosian given default Petrosian measurements.

Parameters:
gridstr

Correction grid generated by petrofit.correction.generate_petrosian_sersic_correction. Use PetrosianCorrection.read(file_path) to read grid from file.

enforce_rangebool

If true, the nearest approximation is returned. If false, an assertion will be applied that makes sure that the profiles to be corrected are covered by the correction grid.

Attributes Summary

grid_keys

Methods Summary

correct(p)

estimate_epsilon(p)

Given the half light radius and c2080 computed using the default epsilon value, return a corrected epsilon value.

estimate_n(p)

Given the half light radius and c2080 computed using the default epsilon value, return an estimated sersic index n.

filter_grid(key, value)

plot_correction(p[, cmap, target_c, ...])

read(grid_file[, file_format])

Read grid from file.

unique_grid_values(key)

write(grid_file[, file_format])

Write grid to file.

Attributes Documentation

grid_keys

Methods Documentation

correct(p)[source]
estimate_epsilon(p)[source]

Given the half light radius and c2080 computed using the default epsilon value, return a corrected epsilon value.

estimate_n(p)[source]

Given the half light radius and c2080 computed using the default epsilon value, return an estimated sersic index n.

filter_grid(key, value)[source]
plot_correction(p, cmap='hot', target_c='blue', cmap_key='n', colorbar_label=None, suptitle=None, axs=None)[source]
classmethod read(grid_file, file_format=None)[source]

Read grid from file.

unique_grid_values(key)[source]
write(grid_file, file_format=None)[source]

Write grid to file.