zooniverse / Lens-Zoo

Apache License 2.0
0 stars 4 forks source link

Lens Toy #7

Closed kapadia closed 11 years ago

kapadia commented 11 years ago

Incorporate into Guide?

drphilmarshall commented 11 years ago

There are two places where we can put a lens toy:

1) In the porthole on the landing page! Maybe this is a good place for the full frame toy?

2) Embedded in the first paragraph of the science page text. Probably the group toy could go here.

drphilmarshall commented 11 years ago

These examples can be hacked out of the code on the SpaceWarps prototypes github:

http://drphilmarshall.github.com/SpaceWarps/training/Playground/index.html

drphilmarshall commented 11 years ago

We will also need some sort of prod to show the users that the landing page Lens Toy is actually a Lens Toy... Perhaps a once sentence caption under the porthole? Or some other way of encouraging the user to put their mouse in the image?

kapadia commented 11 years ago

@drphilmarshall Will you take a look at public/index.html. There are errors and the lens toy is not working.

drphilmarshall commented 11 years ago

I'm on the case - will report tomorrow!

On Fri, Apr 12, 2013 at 8:44 PM, Amit Kapadia notifications@github.comwrote:

@drphilmarshall https://github.com/drphilmarshall Will you take a look at public/index.html. There are errors and the lens toy is not working.

— Reply to this email directly or view it on GitHubhttps://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-16313580 .

drphilmarshall commented 11 years ago

I implemented a better toy model, that allows us to use the previous nice image (that has a lens in it). I cannot test the LensToy functionality without edit access to the css though. Where is /application.css kept, please?

<link rel="stylesheet" href="/application.css" type="text/css" charset="utf-8">
kapadia commented 11 years ago

Don't worry about application.css. You can add styles directly in index.html using <style></style>.

drphilmarshall commented 11 years ago

OK. I tried this, but still no working Lens Toy... I'll play around a bit more. The console is complaining more about your js than mine! :-)

kapadia commented 11 years ago

what type of complaints?

On Apr 22, 2013, at 1:03 PM, Phil Marshall notifications@github.com wrote:

OK. I tried this, but still no working Lens Toy... I'll play around a bit more. The console is complaining more about your js than mine! :-)

— Reply to this email directly or view it on GitHub.

drphilmarshall commented 11 years ago

GET file://localhost/application.css index.html:7 GET file://localhost/home/marshallp/public_html/SpaceWarps/Dev/public/application.js index.html:9 Uncaught ReferenceError: require is not defined index.html:282 Uncaught ReferenceError: $ is not defined index.html:319 Unsafe JavaScript attempt to access frame with URL file://localhost/home/marshallp/public_html/SpaceWarps/Dev/public/index.html from frame with URL http://player.vimeo.com/video/61565217. The frame requesting access has a protocol of 'http', the frame being accessed has a protocol of 'file'. Protocols must match. swfobject.v2.2.js:1 Unsafe JavaScript attempt to access frame with URL file://localhost/home/marshallp/public_html/SpaceWarps/Dev/public/index.html from frame with URL http://player.vimeo.com/video/61565217. The frame requesting access has a protocol of 'http', the frame being accessed has a protocol of 'file'. Protocols must match. swfobject.v2.2.js:1

kapadia commented 11 years ago

You need to be running a local server. We use a system called Hem.

The first two code snippets on the project's README should get you going.

Amit

On Apr 22, 2013, at 1:14 PM, Phil Marshall notifications@github.com wrote:

GET file://localhost/application.css index.html:7 GET file://localhost/home/marshallp/public_html/SpaceWarps/Dev/public/application.js index.html:9 Uncaught ReferenceError: require is not defined index.html:282 Uncaught ReferenceError: $ is not defined index.html:319 Unsafe JavaScript attempt to access frame with URL file://localhost/home/marshallp/public_html/SpaceWarps/Dev/public/index.html from frame with URL http://player.vimeo.com/video/61565217. The frame requesting access has a protocol of 'http', the frame being accessed has a protocol of 'file'. Protocols must match. swfobject.v2.2.js:1 Unsafe JavaScript attempt to access frame with URL file://localhost/home/marshallp/public_html/SpaceWarps/Dev/public/index.html from frame with URL http://player.vimeo.com/video/61565217. The frame requesting access has a protocol of 'http', the frame being accessed has a protocol of 'file'. Protocols must match. swfobject.v2.2.js:1

— Reply to this email directly or view it on GitHub.

kapadia commented 11 years ago

Merged, but it's not working.

THe following resources are missing:

What do those correspond to?

drphilmarshall commented 11 years ago

They are images that Lens Toy does not need, but are apparently being read in when the Toy is initialised. I think failure to find them is a non-destructive error - and not what is causing the predicted arcs not to appear (I tested it here with and without the error).

Dr. Phil Marshall

Department of Physics (Astrophysics) University of Oxford, Denys Wilkinson Building, Room 532E (BIPAC) Keble Road, Phone: +44 1865 273345 Oxford, OX1 3RH http://www.slac.stanford.edu/~pjm

On Mon, Apr 22, 2013 at 7:22 PM, Amit Kapadia notifications@github.comwrote:

Merged, but it's not working.

THe following resources are missing:

  • SL2SJ140156+554446_irg_100x100.png
  • SW_field_440x440.png

What do those correspond to?

— Reply to this email directly or view it on GitHubhttps://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-16811257 .

drphilmarshall commented 11 years ago

From team hangout: let's relegate this issue to post-launch, and try and get the toy going in the landing page portal in a few weeks time, as a treat for teh people who stick around! Thanks for trying, Amit :-)

aprajita commented 11 years ago

I agree this isn't time critical but we could make movie of the lens toy in action (i.e as someone moves their curosr over one the cfht images) and use that as a looped animation on the landing page instaed of the toy itself. if we produced such a movie @kapadia would that be time consuming to implement on the landing page and/or science page? Having said that I'm not sure how to produce such an animation but can look into it if implementing it is possible.

drphilmarshall commented 11 years ago

Hah! Great idea. You're talking about an animated gif - or I guess any kind of web movie that could play in loop mode (forever). Andrew Pontzen just suggested that we could use QuickTime Player to make a New Screen Recording, select the region of the LensToy example page we want, record a suitable sequence of mouse moves, and then save to desktop. Photoshop can then be used to make an animated gif; I guess iMovie might also make something useful. What formats support infinite loops, apart from gif, anyone? @ttfnrob?

Dr. Phil Marshall

Department of Physics (Astrophysics) University of Oxford, Denys Wilkinson Building, Room 532E (BIPAC) Keble Road, Phone: +44 1865 273345 Oxford, OX1 3RH http://www.slac.stanford.edu/~pjm

On Fri, May 3, 2013 at 3:26 PM, aprajita notifications@github.com wrote:

I agree this isn't time critical but we could make movie of the lens toy in action (i.e as someone moves their curosr over one the cfht images) and use that as a looped animation on the landing page instaed of the toy itself. if we produced such a movie @kapadia https://github.com/kapadiawould that be time consuming to implement on the landing page and/or science page? Having said that I'm not sure how to produce such an animation but can look into it if implementing it is possible.

— Reply to this email directly or view it on GitHubhttps://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-17396823 .

aprajita commented 11 years ago

hi phil yes, before i left work i made 3 examples of a QT movie using the screen recording. i'll put them up somewhere later, they didnt look very smart but that was because of me! aprajita.

arfon commented 11 years ago

I've yet to see this working on the front page - is this still planned?

aprajita commented 11 years ago

i havent sent amit the movies yet, will try to later tonight

kapadia commented 11 years ago

@aprajita Are we settling with a GIF for now?

aprajita commented 11 years ago

Hi @kapadia, I was waiting to hear from you if it would be easy to implement a movie & in what file format. Have made some .mov files but will export them into a format that's good for you, if this is at all possible. When you say GIF do you mean that you can implement an animated GIF or do you mean the current static image?

kapadia commented 11 years ago

if you make an animated gif, i'll throw it in.

On Mon, May 6, 2013 at 11:18 AM, aprajita notifications@github.com wrote:

Hi @kapadia https://github.com/kapadia, I was waiting to hear from you if it would be easy to implement a movie & in what file format. Have made some .mov files but will export them into a format that's good for you, if this is at all possible. When you say GIF do you mean that you can implement an animated GIF or do you mean the current static image?

— Reply to this email directly or view it on GitHubhttps://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-17491535 .

kapadia commented 11 years ago

again, this would be replaced once we get the lens toy working.

On Mon, May 6, 2013 at 11:22 AM, Amit Kapadia amit@zooniverse.org wrote:

if you make an animated gif, i'll throw it in.

On Mon, May 6, 2013 at 11:18 AM, aprajita notifications@github.comwrote:

Hi @kapadia https://github.com/kapadia, I was waiting to hear from you if it would be easy to implement a movie & in what file format. Have made some .mov files but will export them into a format that's good for you, if this is at all possible. When you say GIF do you mean that you can implement an animated GIF or do you mean the current static image?

— Reply to this email directly or view it on GitHubhttps://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-17491535 .

drphilmarshall commented 11 years ago

He means an animated gif, I think. At least, that's what the rest of the internet seems to mean by gif these days!

Dr. Phil Marshall

Department of Physics (Astrophysics) University of Oxford, Denys Wilkinson Building, Room 532E (BIPAC) Keble Road, Phone: +44 1865 273345 Oxford, OX1 3RH http://www.slac.stanford.edu/~pjm

On Mon, May 6, 2013 at 5:18 PM, aprajita notifications@github.com wrote:

Hi @kapadia https://github.com/kapadia, I was waiting to hear from you if it would be easy to implement a movie & in what file format. Have made some .mov files but will export them into a format that's good for you, if this is at all possible. When you say GIF do you mean that you can implement an animated GIF or do you mean the current static image?

— Reply to this email directly or view it on GitHubhttps://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-17491535 .

drphilmarshall commented 11 years ago

Wicked! :-)

Dr. Phil Marshall

Department of Physics (Astrophysics) University of Oxford, Denys Wilkinson Building, Room 532E (BIPAC) Keble Road, Phone: +44 1865 273345 Oxford, OX1 3RH http://www.slac.stanford.edu/~pjm

On Mon, May 6, 2013 at 5:27 PM, Amit Kapadia notifications@github.comwrote:

again, this would be replaced once we get the lens toy working.

On Mon, May 6, 2013 at 11:22 AM, Amit Kapadia amit@zooniverse.org wrote:

if you make an animated gif, i'll throw it in.

On Mon, May 6, 2013 at 11:18 AM, aprajita notifications@github.comwrote:

Hi @kapadia https://github.com/kapadia, I was waiting to hear from you if it would be easy to implement a movie & in what file format. Have made some .mov files but will export them into a format that's good for you, if this is at all possible. When you say GIF do you mean that you can implement an animated GIF or do you mean the current static image?

— Reply to this email directly or view it on GitHub< https://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-17491535> .

— Reply to this email directly or view it on GitHubhttps://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-17492013 .

aprajita commented 11 years ago

Hi Amit I'll send you a link for the animated gif (too big to upload here :-/). I tried quite hard to get this the right speed and small, but from the 0.4Mb .mov file, this explodes to a 10Mb gif. I guess for this to load fast I'll need to make it smaller. Also, there's quite a large border, i presume/hope the port-hole masks most of the dead space. If not, and if the lenses aren't well paced in the gif, please let me know and i'll remake it.

aprajita commented 11 years ago

sorry, here's the link to the file https://docs.google.com/file/d/0Bwx2SzYNg-RmbVNGMEU3dWNZUHc/edit?usp=sharing

arfon commented 11 years ago

Removing from launch milestone.

kapadia commented 11 years ago

@aprajita We need something on the order of 500 kb to put this in.

drphilmarshall commented 11 years ago

Oof - that's a tall order. Leave it with us, and we'll ask around in Oxford for some possible cheap options. Thanks!

Dr. Phil Marshall

Department of Physics (Astrophysics) University of Oxford, Denys Wilkinson Building, Room 532E (BIPAC) Keble Road, Phone: +44 1865 273345 Oxford, OX1 3RH http://www.slac.stanford.edu/~pjm

On Tue, May 7, 2013 at 7:20 PM, Amit Kapadia notifications@github.comwrote:

@aprajita https://github.com/aprajita We need something on the order of 500 kb to put this in.

— Reply to this email directly or view it on GitHubhttps://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-17560250 .

aprajita commented 11 years ago

ok thanks @kapadia will try to reduce it

aprajita commented 11 years ago

halved the resolution to make it smaller (560kb) but this may look crappy on the landing page. the first one runs 2x as fast as the second. I think try the second first. please let me know if the gif is too small and i'll check other resampling methods - thanks. PS dont ask me why the border changes from black to transparent - have no idea how that happened! lenstoymov_6fps_50pc lenstoymov_6fps_50pc_10

kapadia commented 11 years ago

link?

On Tue, May 7, 2013 at 2:37 PM, aprajita notifications@github.com wrote:

halved the resolution to make it smaller (560kb) but this may look crappy on the landing page. the first one runs 2x as fast as the second. I think try the second first. please let me know if the gif is too small and i'll check other resampling methods - thanks. PS dont ask me why the border changes from black to transparent - have no idea how that happened! [image: lenstoymov_6fps_50pc]https://f.cloud.github.com/assets/1917970/473405/9ba07dea-b74c-11e2-9dea-ac6968cd48ac.gif [image: lenstoymov_6fps_50pc_10]https://f.cloud.github.com/assets/1917970/473429/51cbd54c-b74d-11e2-99f1-b51d703bc7d8.gif

— Reply to this email directly or view it on GitHubhttps://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-17565153 .

drphilmarshall commented 11 years ago

I think Aprajita just sent you actual gifs - at least thats how I saw them in my email. Looks like you can scrape them out of the github issue on the github site!

Dr. Phil Marshall

Department of Physics (Astrophysics) University of Oxford, Denys Wilkinson Building, Room 532E (BIPAC) Keble Road, Phone: +44 1865 273345 Oxford, OX1 3RH http://www.slac.stanford.edu/~pjm

On Tue, May 7, 2013 at 8:41 PM, Amit Kapadia notifications@github.comwrote:

link?

On Tue, May 7, 2013 at 2:37 PM, aprajita notifications@github.com wrote:

halved the resolution to make it smaller (560kb) but this may look crappy on the landing page. the first one runs 2x as fast as the second. I think try the second first. please let me know if the gif is too small and i'll check other resampling methods - thanks. PS dont ask me why the border changes from black to transparent - have no idea how that happened! [image: lenstoymov_6fps_50pc]< https://f.cloud.github.com/assets/1917970/473405/9ba07dea-b74c-11e2-9dea-ac6968cd48ac.gif>

[image: lenstoymov_6fps_50pc_10]< https://f.cloud.github.com/assets/1917970/473429/51cbd54c-b74d-11e2-99f1-b51d703bc7d8.gif>

— Reply to this email directly or view it on GitHub< https://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-17565153> .

— Reply to this email directly or view it on GitHubhttps://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-17565362 .

kapadia commented 11 years ago

ah okay, they don't show up in email.

aprajita commented 11 years ago

sorry they are at: https://docs.google.com/file/d/0Bwx2SzYNg-RmWjdVcFBCNFBGMmM/edit?usp=sharing https://docs.google.com/file/d/0Bwx2SzYNg-RmbGttSE9vMHAxY1E/edit?usp=sharing

kapadia commented 11 years ago

LENS TOY DEPLOYED!

drphilmarshall commented 11 years ago

Excellent!

Looks like theres a small offset between the predicted image and the background frame, some sort of css problem. The test is that the little rings must form centred on the singel yellow galaxies directly above the main (real) lens.

Also, I think the blue porthole frame needs to be on top, right? At the moment, the predicted image appears on top of the blue page!

Nice and fast though - very good! :-)

On Fri, May 10, 2013 at 8:38 PM, Amit Kapadia notifications@github.comwrote:

LENS TOY DEPLOYED!

— Reply to this email directly or view it on GitHubhttps://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-17740338 .

anupreeta27 commented 11 years ago

Awesome!!!

Can we have a small pointer outside portal on which there's a tooltip "Move cursor on the image & watch!!" We can "Talk" about it but a pointer is helpful for both old and new users, imo.

Since the lenstoy takes a few seconds to load and the existing user base is not aware of the presence of lenstoy, I doubt anyone will try to bring their cursor over the portal (unless by chance), they will directly head to classify.

drphilmarshall commented 11 years ago

I see Amit didn't have time to fix the alignment of the LensToy before he left: is it possible to disable it until he can fix it properly? It might be better to have no implementation than one that is misleading... We do not expect rings to form in empty space, and would very much prefer the spotters to not get distracted by such unphysical things! Thanks :-)

drphilmarshall commented 11 years ago

Just pinging this issue again - the LensToy deployment still has some bugs in it!

1) Arcs are offset from lens galaxies, a css placement problem

2) Arcs appear outside porthole, layer ordering problem

3) There is no visual cue to prompt people to put their cursor in the porthole, which is good at the moment because it doesn't look good with the funny offset... :-)

On Fri, May 10, 2013 at 8:57 PM, Phil Marshall dr.phil.marshall@gmail.comwrote:

Excellent!

Looks like theres a small offset between the predicted image and the background frame, some sort of css problem. The test is that the little rings must form centred on the singel yellow galaxies directly above the main (real) lens.

Also, I think the blue porthole frame needs to be on top, right? At the moment, the predicted image appears on top of the blue page!

Nice and fast though - very good! :-)

Dr. Phil Marshall

Department of Physics (Astrophysics) University of Oxford, Denys Wilkinson Building, Room 532E (BIPAC)

Keble Road, Phone: +44 1865 273345 Oxford, OX1 3RH http://www.slac.stanford.edu/~pjm

On Fri, May 10, 2013 at 8:38 PM, Amit Kapadia notifications@github.comwrote:

LENS TOY DEPLOYED!

— Reply to this email directly or view it on GitHubhttps://github.com/zooniverse/Lens-Zoo/issues/7#issuecomment-17740338 .