ejeschke / ginga

The Ginga astronomical FITS file viewer
BSD 3-Clause "New" or "Revised" License
122 stars 77 forks source link

Add LoaderConfig plugin to the Reference Viewer #1076

Closed ejeschke closed 11 months ago

ejeschke commented 1 year ago

The LoaderConfig plugin allows you to configure the file openers that can be used to load various content into Ginga.

Registered file openers are associated with file MIME types, and there can be several openers for a single MIME type. A priority associated with a MIME type/opener pairing determines which opener will be used for each type--the lowest priority value will determine which opener will be used. If there are more than one opener with the same low priority then the user will be prompted for which opener to use, when opening a file in Ginga. This plugin can be used to set the opener preferences and save it to the user's $HOME/.ginga configuration area.

Documentation added and change log updated.

ejeschke commented 1 year ago

If/when you have time, @pllim.

ejeschke commented 1 year ago

Previously, the loader preference could only be set by using the --fitspkg command line option or the FITSpkg setting in general.cfg. These methods still work, and use the loader priority apparatus, as before.

pllim commented 1 year ago

@ejeschke , I probably won't have time till next week at the earliest. I also have not been using this feature much, so not sure how best to contribute here.

ejeschke commented 1 year ago

No problem. Most users will not notice or need unless they have both astropy and fitsio installed.

pllim commented 12 months ago

Hmm where did the ReadTheDocs check go?

pllim commented 12 months ago

I think RTD isn't pick up the YAML file because now the default pattern they look for is .yaml and not .yml. I think I fixed it on the admin panel but closing/reopening here to be sure.

pllim commented 12 months ago

Oh, I misunderstood the instruction. I think we actually have to rename the YAML file. (https://github.com/ejeschke/ginga/pull/1078)

ejeschke commented 11 months ago

What is the behavior for files not recognized by MIME, like ASDF?

There is a set of known types that will be recognized if they are failed to be identified by ASDF. The file extension ".asdf" is one of them. But we also have a special check for ASDF embedded in FITS (especially for STScI)

ejeschke commented 11 months ago

Thanks, @pllim!