sunpy / sunkit-spex

:construction: Under Development :construction: A package for solar X-ray spectroscopy
BSD 3-Clause "New" or "Revised" License
22 stars 26 forks source link

Only instrument loading classes should be passed to the fitter, nothing else #119

Open KriSun95 opened 11 months ago

KriSun95 commented 11 months ago

Describe the feature

Previously, only files and dictionaries containing data to be fitted could be passed to the fitting code. This was improved in #107 where a bug was fixed and the instrument loader classes were allowed to be passed.

The proposed feature in this Issue is to only allow the instrument loaders to be passed. This will detangle a lot of code while making it simpler to separate and maintain code relating to different instruments right now and in the future.

Proposed solution

Remove the ability to pass files and dictionaries to the fitting code. Instead, the files will be given to the relevant instrument loader which can then be passed to the fitting code. Likewise, custom dictionaries from a user's unsupported instrument or source can be given to the CustomLoader() and then passed.

This change should be consistent with and support any future re-factor to the code, especially when making it more modular.