{"action":"created","issue":{"url":"https://api.github.com/repos/pcbend/GRSISort/issues/263","labels_url":"https://api.github.com/repos/pcbend/GRSISort/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/pcbend/GRSISort/issues/263/comments","events_url":"https://api.github.com/repos/pcbend/GRSISort/issues/263/events","html_url":"https://github.com/pcbend/GRSISort/issues/263","id":64667053,"number":263,"title":"TChannel initialization and overwriting","user":{"login":"SmithJK","id":10604745,"avatar_url":"https://avatars.githubusercontent.com/u/10604745?v=3","gravatar_id":"","url":"https://api.github.com/users/SmithJK","html_url":"https://github.com/SmithJK","followers_url":"https://api.github.com/users/SmithJK/followers","following_url":"https://api.github.com/users/SmithJK/following{/other_user}","gists_url":"https://api.github.com/users/SmithJK/gists{/gist_id}","starred_url":"https://api.github.com/users/SmithJK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SmithJK/subscriptions","organizations_url":"https://api.github.com/users/SmithJK/orgs","repos_url":"https://api.github.com/users/SmithJK/repos","events_url":"https://api.github.com/users/SmithJK/events{/privacy}","received_events_url":"https://api.github.com/users/SmithJK/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pcbend/GRSISort/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-27T00:56:55Z","updated_at":"2015-03-31T19:41:38Z","closed_at":null,"body":"When I sort a file with a specified calibration file (grsisort myrun0000.mid GRIFFINcal.cal --suppress_errors) and then open up the fragment file and read the TChannels (TChannel::ReadCalFromTree(FragmentTree)), I see that channels that I did not include in the calibration file (and in this case are not even present in the data) are initialized.\r\n\r\nSimilarly, if I open this fragment file and then read in that calibration file (TChannel::ReadCalFile(\"GRIFFINcal.cal\"), I don't see my new calibration always taking effect. I think this has to do with the was that channels are called when being overwritten. Specific example: in the TChannel associated with the tree, channel 64 is associated with GRG14BN00A and address 0x1200. My calibration file assigns channel 64 to GRG16WN00A and address 0x110f. When I read in the calibration file, channel 64 is still associated with GRG14BN00A and 0x1200.\r\n\r\nThis suggests to me that there is some default correlation of channels, mnemonics, and addresses in the code. I understand the practicality of a default correlation of these. (On a side note, it looks like the default is from the last set of experiments, which is probably not the default we want.) It looks to me that the channels are being replaced or overwritten based on address. In the case when two address point to the same channel, the GetChannelByNumber function is confusing.\r\n\r\nTo me this behavior is confusing, though I can see how this is not simple from a coding perspective. @pcbend, is this how you intended the TChannel to work? Is this just an inherent difficult with the class?"},"comment":{"url":"https://api.github.com/repos/pcbend/GRSISort/issues/comments/88222355","html_url":"https://github.com/pcbend/GRSISort/issues/263#issuecomment-88222355","issue_url":"https://api.github.com/repos/pcbend/GRSISort/issues/263","id":88222355,"user":{"login":"r3dunlop","id":5428160,"avatar_url":"https://avatars.githubusercontent.com/u/5428160?v=3","gravatar_id":"","url":"https://api.github.com/users/r3dunlop","html_url":"https://github.com/r3dunlop","followers_url":"https://api.github.com/users/r3dunlop/followers","following_url":"https://api.github.com/users/r3dunlop/following{/other_user}","gists_url":"https://api.github.com/users/r3dunlop/gists{/gist_id}","starred_url":"https://api.github.com/users/r3dunlop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r3dunlop/subscriptions","organizations_url":"https://api.github.com/users/r3dunlop/orgs","repos_url":"https://api.github.com/users/r3dunlop/repos","events_url":"https://api.github.com/users/r3dunlop/events{/privacy}","received_events_url":"https://api.github.com/users/r3dunlop/received_events","type":"User","site_admin":false},"created_at":"2015-03-31T19:41:38Z","updated_at":"2015-03-31T19:41:38Z","body":"Or include a TChannel::Swap function (most likely used function for misplaced detectors) so you don't have to clear a TChannel. Again, this will notify both maps."}}