{"action":"created","issue":{"url":"https://api.github.com/repos/ejeschke/ginga/issues/226","labels_url":"https://api.github.com/repos/ejeschke/ginga/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/ejeschke/ginga/issues/226/comments","events_url":"https://api.github.com/repos/ejeschke/ginga/issues/226/events","html_url":"https://github.com/ejeschke/ginga/pull/226","id":117254692,"number":226,"title":"(reference viewer) Refactor channels ","user":{"login":"ejeschke","id":1305473,"avatar_url":"https://avatars.githubusercontent.com/u/1305473?v=3","gravatar_id":"","url":"https://api.github.com/users/ejeschke","html_url":"https://github.com/ejeschke","followers_url":"https://api.github.com/users/ejeschke/followers","following_url":"https://api.github.com/users/ejeschke/following{/other_user}","gists_url":"https://api.github.com/users/ejeschke/gists{/gist_id}","starred_url":"https://api.github.com/users/ejeschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejeschke/subscriptions","organizations_url":"https://api.github.com/users/ejeschke/orgs","repos_url":"https://api.github.com/users/ejeschke/repos","events_url":"https://api.github.com/users/ejeschke/events{/privacy}","received_events_url":"https://api.github.com/users/ejeschke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-17T00:50:28Z","updated_at":"2015-11-17T20:52:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ejeschke/ginga/pulls/226","html_url":"https://github.com/ejeschke/ginga/pull/226","diff_url":"https://github.com/ejeschke/ginga/pull/226.diff","patch_url":"https://github.com/ejeschke/ginga/pull/226.patch"},"body":"This PR is intended to address several outstanding inter-related issues in Ginga.\r\n\r\nBasically, it adds a full history to channels that goes beyond the simple `Datasrc` that is used to hold the current images in memory. This history contains information about every image that has been loaded into a channel, and can be used to recreate images that have been pushed out of the data source.  Furthermore, the history can be sorted.  This facilitates the following:\r\n\r\n1) you can now step through all the images in a channel using the channel up/down navigation arrows, not just the ones that are in memory.\r\n2) the images in a channel can be sorted according to different criteria, like alphabetically or by time loaded, depending on how the user wants to see them or move through them. The stepping function obeys this order.\r\n3) it should eventually simplify the `Thumbs` and `Contents` plugins somewhat, which maintain their own histories and indexes, by creating a common index and history that can be shared by plugins\r\n4) it makes it possible to copy or move image information between channels for images that are out of memory.\r\n \r\nTo do this a `Channel` class is added, and it becomes more of a \"smart object\" than simply a placeholder of attributes."},"comment":{"url":"https://api.github.com/repos/ejeschke/ginga/issues/comments/157502755","html_url":"https://github.com/ejeschke/ginga/pull/226#issuecomment-157502755","issue_url":"https://api.github.com/repos/ejeschke/ginga/issues/226","id":157502755,"user":{"login":"ejeschke","id":1305473,"avatar_url":"https://avatars.githubusercontent.com/u/1305473?v=3","gravatar_id":"","url":"https://api.github.com/users/ejeschke","html_url":"https://github.com/ejeschke","followers_url":"https://api.github.com/users/ejeschke/followers","following_url":"https://api.github.com/users/ejeschke/following{/other_user}","gists_url":"https://api.github.com/users/ejeschke/gists{/gist_id}","starred_url":"https://api.github.com/users/ejeschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejeschke/subscriptions","organizations_url":"https://api.github.com/users/ejeschke/orgs","repos_url":"https://api.github.com/users/ejeschke/repos","events_url":"https://api.github.com/users/ejeschke/events{/privacy}","received_events_url":"https://api.github.com/users/ejeschke/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T20:52:43Z","updated_at":"2015-11-17T20:52:43Z","body":"We'll have to determine how these settings should interact.  Each plugin provides a different view into the files.  `Thumbs` mixes them all together, `Contents` separates out by channel, etc.  And sometimes you may want one view in a plugin, but not in others.  For example, it is possible in `Contents` to sort on another field (this is by design--suppose you want to sort on the FITS `OBJECT` for example).  Then when you navigate the `Contents` by the arrow keys you get a different order than when you navigate by arrow keys in the image itself."}}