Skip to content

API Improvements to AbsorberExtractor #7

Description

@clairekope

It's slightly confusing and misleading that AbsorberExtractor must initialize using a file. It implies that a new AbsorberExtractor instance must be initialized every time a new ray is to be processed, even though get_absorbers is internally capable of making the supplied AbsorberExtractor object load in new rays.

  • I think ray_filename should be removed from the AbsorberExtractor initializer. AbsorberExtractor.load_ray() should be either explicitly called by the user, or called by the get_spice_absorbers and get_spectacle_absorber methods using associated arguments.

Additionally, AbsorberExtractor is initialized with a mixture of arguments that apply to either the SPICE or Spectacle extraction methods.

  • These should be moved to their respective methods; e.g., move the verlocity_res argument to get_spice_absorbers and spectacle_res to get_spectacle_absorbers.
  • The units_dict and field arguments that get_spice_absorbers currently takes should be made part of the AbsorberExtractor initializer.
  • units_dict and field should affect Spectacle data outputs as well. I figure this isn't currently the case because Spectacle was abandoned in favor of SPICE, but if SALSA still wants to support Spectacle I think it should be done.

If/when I start working on these, I'll open a linked WIP PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions