{"action":"created","issue":{"url":"https://api.github.com/repos/isetbio/isetbio/issues/84","labels_url":"https://api.github.com/repos/isetbio/isetbio/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/isetbio/isetbio/issues/84/comments","events_url":"https://api.github.com/repos/isetbio/isetbio/issues/84/events","html_url":"https://github.com/isetbio/isetbio/issues/84","id":106429415,"number":84,"title":"Cone spacing as a function of eccentricity","user":{"login":"jamesgolden1","id":8620201,"avatar_url":"https://avatars.githubusercontent.com/u/8620201?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesgolden1","html_url":"https://github.com/jamesgolden1","followers_url":"https://api.github.com/users/jamesgolden1/followers","following_url":"https://api.github.com/users/jamesgolden1/following{/other_user}","gists_url":"https://api.github.com/users/jamesgolden1/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesgolden1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesgolden1/subscriptions","organizations_url":"https://api.github.com/users/jamesgolden1/orgs","repos_url":"https://api.github.com/users/jamesgolden1/repos","events_url":"https://api.github.com/users/jamesgolden1/events{/privacy}","received_events_url":"https://api.github.com/users/jamesgolden1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-09-14T21:13:03Z","updated_at":"2015-09-17T12:59:20Z","closed_at":null,"body":"A few weeks ago, David mentioned that he had code based on data from the Sloan to specify cone spacing as a function of the eccentricity. I am interested in implementing this, as it is important for both future RGC simulations and Fred's color Gabor detection experiment with Greg Horwitz. \r\n\r\nThe spacing of cones in the sensor object is set by sensorSetSizeToFOV.m. There are also width/height and widthgap/heightgap properties of 'pixel', but the number of cones in the sensor is set before these can be set (as far as I can tell). I wanted to start this issue to allow for any thoughts or comments on how this ought to be implemented. I have a quick and messy calculation based on Fig. 3 from the paper below and I am working on incorporating this into sensorSetSizeToFOV.m.\r\n\r\nHere is the paper:\r\nhttps://www.cis.uab.edu/sloan/ScienceCover/Curcio_Science1987.pdf"},"comment":{"url":"https://api.github.com/repos/isetbio/isetbio/issues/comments/141074164","html_url":"https://github.com/isetbio/isetbio/issues/84#issuecomment-141074164","issue_url":"https://api.github.com/repos/isetbio/isetbio/issues/84","id":141074164,"user":{"login":"DavidBrainard","id":1158757,"avatar_url":"https://avatars.githubusercontent.com/u/1158757?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidBrainard","html_url":"https://github.com/DavidBrainard","followers_url":"https://api.github.com/users/DavidBrainard/followers","following_url":"https://api.github.com/users/DavidBrainard/following{/other_user}","gists_url":"https://api.github.com/users/DavidBrainard/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidBrainard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidBrainard/subscriptions","organizations_url":"https://api.github.com/users/DavidBrainard/orgs","repos_url":"https://api.github.com/users/DavidBrainard/repos","events_url":"https://api.github.com/users/DavidBrainard/events{/privacy}","received_events_url":"https://api.github.com/users/DavidBrainard/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T12:59:20Z","updated_at":"2015-09-17T12:59:20Z","body":"I uploaded the mosaic code to isettools/mosaic.  There is a README.txt file in that directory.  It says:\r\n\r\nNotes on mosaic code\r\n\r\n\r\nThe Curcio/Sloan model is for the overall cone packing, without regard to cone type.  It is implemented in the function MakeSloanList, which takes an argument for the number of cones, the number of pixels (given as linear number of pixels for a square image), and the parameters of the model.\r\n\r\nThe model and how parameters vary with eccentricity is described in: Curcio CA, Sloan KR. 1992. Packing geometry of human cone photoreceptors: variation with eccentricity and evidence for local anisotropy. Visual Neurosci 9: 169-80.\r\n\r\nTo generate a trichromatic mosaic, the routine is MakeSloanSClist.  This takes the same arguments as MakeSloanList, plus the number of cones that should be S and M.  It generates an overall mosaic, then a mosaic with the same parameters with the number of S cones.  The cones in the overall list that are nearest to the generated S cones are called S.  The rest are allocated between L and M by coin flipping according to the L:M ratio implied by the input parameters.  I just made up this method of generating the overall mosaic, but it seems pretty reasonable.  There may now be better data on the geometry of S cone packing. \r\n\r\nOne could think about adding an option to create a tritanopic area in the very central fovea, which I did not do.  That would require working in units of degrees or mm of retina and specifing the size of the tritanopic area.  \r\n\r\nAs this code gets brought into ISETBIO, we probably do want to make it work in actual units of retinal size, either angle or mm, and make it use a table of parameters taken from the paper.  It is possible that it would be better to specify fraction of S cones rather than number, and L:M ratio rather than number of M cones.  But be careful to round to integer number of cones in a sensible manner, and if there is a tritanopic area to reason about that sensibly.\r\n\r\nThe output of MakeSloanList is a list of x,y positions.  The output of MakeSloanClist is x,y positions plus an indicator variable (1 -> L, 2 -> M, 3 -> S) giving type of each cone.\r\n\r\nThis code was written in the early 1990's and was part of a larger toolbox that did various image manipulations related to sampling.  But I think ISETBIO handles most of those, so I have just tried to strip out the key stuff for creating the mosaics.  Matlab had only two-dimensional matrices at the time this was written, so some things may be coded in what seems like a convoluted way given modern Matlab.\r\n\r\n"}}