{"action":"created","comment":{"url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments/31820742","id":31820742,"diff_hunk":"@@ -1,15 +1,19 @@\n package edu.gemini.spModel.core\n \n-sealed abstract class MagnitudeBand private (val name: String, val wavelengthMidPointNm: Option[Int], val description: Option[String], val defaultSystem: MagnitudeSystem) extends Product with Serializable {\n+sealed abstract class MagnitudeBand private (val name: String, val center: Wavelength, val width: Wavelength, val description: Option[String], val defaultSystem: MagnitudeSystem) extends Product with Serializable {\n \n-  private def this(name: String, wavelengthMidPointNm: Int) =\n-    this(name, Some(wavelengthMidPointNm), None, MagnitudeSystem.VEGA)\n+  private def this(name: String, center: Wavelength, width: Wavelength) =\n+    this(name, center, width, None, MagnitudeSystem.VEGA)\n \n-  private def this(name: String, wavelengthMidPointNm: Int, description: String) =\n-    this(name, Some(wavelengthMidPointNm), Some(description), MagnitudeSystem.VEGA)\n+  private def this(name: String, center: Wavelength, width: Wavelength, description: String) =\n+    this(name, center, width, Some(description), MagnitudeSystem.VEGA)\n \n-  private def this(name: String, wavelengthMidPointNm: Int, description: String, defaultMagnitudeSystem: MagnitudeSystem) =\n-    this(name, Some(wavelengthMidPointNm), Some(description), defaultMagnitudeSystem)\n+  private def this(name: String, center: Wavelength, width: Wavelength, description: String, defaultMagnitudeSystem: MagnitudeSystem) =\n+    this(name, center, width, Some(description), defaultMagnitudeSystem)\n+\n+  val start: Wavelength = center + width / 2\n+\n+  val end:   Wavelength = center - width / 2","path":"bundle/edu.gemini.spModel.core/src/main/scala/edu/gemini/spModel/core/MagnitudeBand.scala","position":23,"original_position":23,"commit_id":"562b768d0cff32d33a965d6c0010f3222c6eef07","original_commit_id":"562b768d0cff32d33a965d6c0010f3222c6eef07","user":{"login":"swalker2m","id":4906023,"avatar_url":"https://avatars.githubusercontent.com/u/4906023?v=3","gravatar_id":"","url":"https://api.github.com/users/swalker2m","html_url":"https://github.com/swalker2m","followers_url":"https://api.github.com/users/swalker2m/followers","following_url":"https://api.github.com/users/swalker2m/following{/other_user}","gists_url":"https://api.github.com/users/swalker2m/gists{/gist_id}","starred_url":"https://api.github.com/users/swalker2m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swalker2m/subscriptions","organizations_url":"https://api.github.com/users/swalker2m/orgs","repos_url":"https://api.github.com/users/swalker2m/repos","events_url":"https://api.github.com/users/swalker2m/events{/privacy}","received_events_url":"https://api.github.com/users/swalker2m/received_events","type":"User","site_admin":false},"body":"I think it's great to have start and end but should the width be of type `Wavelength`?  The actual `Wavelength` that that value represents has nothing to do with the band.  Perhaps it is just a raw `Double` I don't know.\r\n\r\nI suppose we could instead define the start and end and compute the center and width.  It's just about the same thing but start and end feel more fundamental somehow.  I admit this is maybe just nit picking.","created_at":"2015-06-05T15:10:31Z","updated_at":"2015-06-05T15:10:31Z","html_url":"https://github.com/gemini-hlsw/ocs/pull/440#discussion_r31820742","pull_request_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/440","_links":{"self":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments/31820742"},"html":{"href":"https://github.com/gemini-hlsw/ocs/pull/440#discussion_r31820742"},"pull_request":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/440"}}},"pull_request":{"url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/440","id":36682024,"html_url":"https://github.com/gemini-hlsw/ocs/pull/440","diff_url":"https://github.com/gemini-hlsw/ocs/pull/440.diff","patch_url":"https://github.com/gemini-hlsw/ocs/pull/440.patch","issue_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/440","number":440,"state":"open","locked":false,"title":"OCSADV-366: Unify ITC and core model wavelength bands.","user":{"login":"fnussber","id":7856060,"avatar_url":"https://avatars.githubusercontent.com/u/7856060?v=3","gravatar_id":"","url":"https://api.github.com/users/fnussber","html_url":"https://github.com/fnussber","followers_url":"https://api.github.com/users/fnussber/followers","following_url":"https://api.github.com/users/fnussber/following{/other_user}","gists_url":"https://api.github.com/users/fnussber/gists{/gist_id}","starred_url":"https://api.github.com/users/fnussber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnussber/subscriptions","organizations_url":"https://api.github.com/users/fnussber/orgs","repos_url":"https://api.github.com/users/fnussber/repos","events_url":"https://api.github.com/users/fnussber/events{/privacy}","received_events_url":"https://api.github.com/users/fnussber/received_events","type":"User","site_admin":false},"body":"This is a PR I put out there mainly for discussion.\r\n\r\nThe aim of OCSADV-366 is to get rid of the ITC specific definition of wavelength bands in ```WavebandDefinition``` and replace them with ```MagnitudeBand```s from the core model.\r\n\r\nIn order to be able to do this I would like to make the following changes, which I put out here for review:\r\n\r\n* Bands not only have a center point but also a width. The width of the bands are for example used in ITC to check if filters overlap with source spectras.\r\n\r\n* I would also like to make the center and width values mandatory (instead of ```Option```) since a band without center point and width doesn't really make much sense. I spoke with Andy about this, and he agrees that from a domain viewpoint this makes sense and suggested that for apparent magnitudes ```AP``` we could use the values of the visible band ```V```.\r\n\r\n* Some of the center values have been changed to the values from ITC. Since currently those values are not used anywhere except for sorting the bands this shouldn't have any impact on the OCS part, however it will keep the results calculated by ITC unchanged.\r\n\r\nIn addition to those changes I have a question:\r\n\r\nWhat are the ```G``` and ```Z``` bands in the core model ```MagnitudeBand```? When we replace the \"old\" with the \"new\" bands in the OT, this means that two additional bands will show up in the OT. Talking with Andy in order to find out the widths of those bands he wasn't quite sure what those bands would refer to and was wondering, if those should actually be ```_g``` and ```_z``` or g' and z'. The center points indicate in this direction and also the fact that when translating those bands to the old model they are mapped to g' and z'. So my question here is, what do we need those bands for and if we can replace ```G``` and ```Z``` with the prime bands ```_g``` and ```_z```? Can anyone shed some light on this?\r\n\r\n","created_at":"2015-06-01T23:35:20Z","updated_at":"2015-06-05T15:10:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e02a09a4c05d9ec6e9f0999bb9f24df161403a4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/440/commits","review_comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/440/comments","review_comment_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/440/comments","statuses_url":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/562b768d0cff32d33a965d6c0010f3222c6eef07","head":{"label":"fnussber:feature/OCSADV-366","ref":"feature/OCSADV-366","sha":"562b768d0cff32d33a965d6c0010f3222c6eef07","user":{"login":"fnussber","id":7856060,"avatar_url":"https://avatars.githubusercontent.com/u/7856060?v=3","gravatar_id":"","url":"https://api.github.com/users/fnussber","html_url":"https://github.com/fnussber","followers_url":"https://api.github.com/users/fnussber/followers","following_url":"https://api.github.com/users/fnussber/following{/other_user}","gists_url":"https://api.github.com/users/fnussber/gists{/gist_id}","starred_url":"https://api.github.com/users/fnussber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnussber/subscriptions","organizations_url":"https://api.github.com/users/fnussber/orgs","repos_url":"https://api.github.com/users/fnussber/repos","events_url":"https://api.github.com/users/fnussber/events{/privacy}","received_events_url":"https://api.github.com/users/fnussber/received_events","type":"User","site_admin":false},"repo":{"id":23975511,"name":"ocs","full_name":"fnussber/ocs","owner":{"login":"fnussber","id":7856060,"avatar_url":"https://avatars.githubusercontent.com/u/7856060?v=3","gravatar_id":"","url":"https://api.github.com/users/fnussber","html_url":"https://github.com/fnussber","followers_url":"https://api.github.com/users/fnussber/followers","following_url":"https://api.github.com/users/fnussber/following{/other_user}","gists_url":"https://api.github.com/users/fnussber/gists{/gist_id}","starred_url":"https://api.github.com/users/fnussber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnussber/subscriptions","organizations_url":"https://api.github.com/users/fnussber/orgs","repos_url":"https://api.github.com/users/fnussber/repos","events_url":"https://api.github.com/users/fnussber/events{/privacy}","received_events_url":"https://api.github.com/users/fnussber/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fnussber/ocs","description":"Gemini's Observatory Control System","fork":true,"url":"https://api.github.com/repos/fnussber/ocs","forks_url":"https://api.github.com/repos/fnussber/ocs/forks","keys_url":"https://api.github.com/repos/fnussber/ocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fnussber/ocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fnussber/ocs/teams","hooks_url":"https://api.github.com/repos/fnussber/ocs/hooks","issue_events_url":"https://api.github.com/repos/fnussber/ocs/issues/events{/number}","events_url":"https://api.github.com/repos/fnussber/ocs/events","assignees_url":"https://api.github.com/repos/fnussber/ocs/assignees{/user}","branches_url":"https://api.github.com/repos/fnussber/ocs/branches{/branch}","tags_url":"https://api.github.com/repos/fnussber/ocs/tags","blobs_url":"https://api.github.com/repos/fnussber/ocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fnussber/ocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fnussber/ocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/fnussber/ocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fnussber/ocs/statuses/{sha}","languages_url":"https://api.github.com/repos/fnussber/ocs/languages","stargazers_url":"https://api.github.com/repos/fnussber/ocs/stargazers","contributors_url":"https://api.github.com/repos/fnussber/ocs/contributors","subscribers_url":"https://api.github.com/repos/fnussber/ocs/subscribers","subscription_url":"https://api.github.com/repos/fnussber/ocs/subscription","commits_url":"https://api.github.com/repos/fnussber/ocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/fnussber/ocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/fnussber/ocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/fnussber/ocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/fnussber/ocs/contents/{+path}","compare_url":"https://api.github.com/repos/fnussber/ocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fnussber/ocs/merges","archive_url":"https://api.github.com/repos/fnussber/ocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fnussber/ocs/downloads","issues_url":"https://api.github.com/repos/fnussber/ocs/issues{/number}","pulls_url":"https://api.github.com/repos/fnussber/ocs/pulls{/number}","milestones_url":"https://api.github.com/repos/fnussber/ocs/milestones{/number}","notifications_url":"https://api.github.com/repos/fnussber/ocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fnussber/ocs/labels{/name}","releases_url":"https://api.github.com/repos/fnussber/ocs/releases{/id}","created_at":"2014-09-12T20:20:20Z","updated_at":"2015-05-08T20:15:23Z","pushed_at":"2015-06-04T06:21:40Z","git_url":"git://github.com/fnussber/ocs.git","ssh_url":"git@github.com:fnussber/ocs.git","clone_url":"https://github.com/fnussber/ocs.git","svn_url":"https://github.com/fnussber/ocs","homepage":"","size":264509,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"gemini-hlsw:develop","ref":"develop","sha":"df08564fc550b9f5da2e01ff896bf61324f20366","user":{"login":"gemini-hlsw","id":8593735,"avatar_url":"https://avatars.githubusercontent.com/u/8593735?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-hlsw","html_url":"https://github.com/gemini-hlsw","followers_url":"https://api.github.com/users/gemini-hlsw/followers","following_url":"https://api.github.com/users/gemini-hlsw/following{/other_user}","gists_url":"https://api.github.com/users/gemini-hlsw/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-hlsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-hlsw/subscriptions","organizations_url":"https://api.github.com/users/gemini-hlsw/orgs","repos_url":"https://api.github.com/users/gemini-hlsw/repos","events_url":"https://api.github.com/users/gemini-hlsw/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-hlsw/received_events","type":"Organization","site_admin":false},"repo":{"id":23963494,"name":"ocs","full_name":"gemini-hlsw/ocs","owner":{"login":"gemini-hlsw","id":8593735,"avatar_url":"https://avatars.githubusercontent.com/u/8593735?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-hlsw","html_url":"https://github.com/gemini-hlsw","followers_url":"https://api.github.com/users/gemini-hlsw/followers","following_url":"https://api.github.com/users/gemini-hlsw/following{/other_user}","gists_url":"https://api.github.com/users/gemini-hlsw/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-hlsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-hlsw/subscriptions","organizations_url":"https://api.github.com/users/gemini-hlsw/orgs","repos_url":"https://api.github.com/users/gemini-hlsw/repos","events_url":"https://api.github.com/users/gemini-hlsw/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-hlsw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gemini-hlsw/ocs","description":"Observatory Control Software","fork":false,"url":"https://api.github.com/repos/gemini-hlsw/ocs","forks_url":"https://api.github.com/repos/gemini-hlsw/ocs/forks","keys_url":"https://api.github.com/repos/gemini-hlsw/ocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-hlsw/ocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-hlsw/ocs/teams","hooks_url":"https://api.github.com/repos/gemini-hlsw/ocs/hooks","issue_events_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-hlsw/ocs/events","assignees_url":"https://api.github.com/repos/gemini-hlsw/ocs/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-hlsw/ocs/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-hlsw/ocs/tags","blobs_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-hlsw/ocs/languages","stargazers_url":"https://api.github.com/repos/gemini-hlsw/ocs/stargazers","contributors_url":"https://api.github.com/repos/gemini-hlsw/ocs/contributors","subscribers_url":"https://api.github.com/repos/gemini-hlsw/ocs/subscribers","subscription_url":"https://api.github.com/repos/gemini-hlsw/ocs/subscription","commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-hlsw/ocs/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-hlsw/ocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-hlsw/ocs/merges","archive_url":"https://api.github.com/repos/gemini-hlsw/ocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-hlsw/ocs/downloads","issues_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-hlsw/ocs/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-hlsw/ocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-hlsw/ocs/labels{/name}","releases_url":"https://api.github.com/repos/gemini-hlsw/ocs/releases{/id}","created_at":"2014-09-12T14:20:23Z","updated_at":"2015-05-08T19:43:56Z","pushed_at":"2015-06-04T19:52:36Z","git_url":"git://github.com/gemini-hlsw/ocs.git","ssh_url":"git@github.com:gemini-hlsw/ocs.git","clone_url":"https://github.com/gemini-hlsw/ocs.git","svn_url":"https://github.com/gemini-hlsw/ocs","homepage":"","size":272862,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":4,"forks":10,"open_issues":4,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/440"},"html":{"href":"https://github.com/gemini-hlsw/ocs/pull/440"},"issue":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/issues/440"},"comments":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/issues/440/comments"},"review_comments":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/440/comments"},"review_comment":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/440/commits"},"statuses":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/562b768d0cff32d33a965d6c0010f3222c6eef07"}}}}