Giter Club home page Giter Club logo

Comments (7)

pllim avatar pllim commented on August 20, 2024

If you set numImages=0 either in ~/.ginga/general.cfg or ~/.ginga/channel_Image.cfg, it sets unlimited cache (then you have to watch your memory usage). I use this setting for QUIP.

The setting in channel_Image.cfg overwrites the setting in general.cfg, if exists. Or inherits from the latter, if not.

from stginga.

pllim avatar pllim commented on August 20, 2024

The actual cache is handled by Datasrc class.

from stginga.

ejeschke avatar ejeschke commented on August 20, 2024

As @pllim says, the deque length for a channel can be set to unlimited by setting the numImages preference to 0.

In regard to naming images, though, it is possible to have total control over the name of the image if you are creating the AstroImage object yourself (in the typical case the reference viewer creates it for you) and specify the name kwarg. Then this name will be used everywhere in the viewer. One thing we do at Subaru Telescope is to override the file opening and do it with a custom opener. Our opener does some parsing on the name to decide which channel the image should end up in, etc. Something like this may be an option for stginga.

One thing to keep in mind--an image can be loaded into more than one channel (unless you control how it is loaded--e.g. someone can just drag a file to a channel). So you may end up with the same name in more than one channel. The Thumbs will show a duplicate name, but if you click each one it will take you to the image in the channel in which it resides. If this kind of behavior is not wanted, then it might be better to write your own opener as described above, because then you can control which images end up in which channels.

from stginga.

stscieisenhamer avatar stscieisenhamer commented on August 20, 2024

For this plugin, I am aiming to not having need of any global environmental changes to occur. And, ideally, this should be invariant against whether cache is on/off, etc. Also, there should be no dependency on loaders either.

I'm currently examining the Thumbs* classes to get some clues. It is looking like path is the answer.

from stginga.

ejeschke avatar ejeschke commented on August 20, 2024

If you think the plugin might be generally useful, consider submitting a PR to the ginga home repo when you have it at a reasonable state. It looks very interesting!

from stginga.

stscieisenhamer avatar stscieisenhamer commented on August 20, 2024

Most definitely! Once we get things good for the sprint, will be doing so.

from stginga.

stscieisenhamer avatar stscieisenhamer commented on August 20, 2024

PR #22

from stginga.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.