Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frap script create figure #32

Merged
merged 11 commits into from
Aug 30, 2018
Merged

Conversation

will-moore
Copy link
Member

@will-moore will-moore commented Aug 14, 2018

This adds OMERO.figure creation to a new simple_frap_with_figure.py script.

Time indexes are currently hard-coded (don't span whole movie) and figure has scalebars and timestamp labels.

I've also updated both simple_frap scripts to use roi_service.getShapeStatsRestricted() instead of getting numpy data (as in Basel day-2 walkthrough).
Also the matplotlib -> PIL image method is changed simply to allow it to run on a Mac. This creates a temp file which isn't deleted (will be cleaned-up when the temp script folder is cleaned up).

To test, use RCC1-FRAP images at http://web-dev-merge.openmicroscopy.org/webclient/?show=dataset-25602 (user-3). These are my own images, so these can be made public.
The jpeg plots come from the Deltavision's own analysis - can be used to tell which image (of same name) gives a good FRAP curve.

  • Choose 2 or more images and small Rectangle on the "bleach spot" where you see the intensity go down in the 4th time point.
  • Select the images and run script (on web-dev-merge under practical > python > server > simple_frap_with_figure
  • Script success message gives the figure ID. Open new tab at /figure/file/ID/ to see it. (screenshot in comment below)

@jburel
Copy link
Member

jburel commented Aug 14, 2018

We should probably keep 2 scripts: frap and frap with figure
since the figure section is large due to the fact that we have to copy some code from gateway

@will-moore
Copy link
Member Author

Added timestamp labels and scalebars:

screen shot 2018-08-16 at 15 46 00

@pwalczysko
Copy link
Member

pwalczysko commented Aug 21, 2018

The script ...with figure version seems to work fine. It does create the Figure as advertised.
But probably because of the missing matplotlib on eel, we do not have the FRAP graph on the Figure. I have imported the images to outreach, and tomorrow I will install the script as well to test this, and also to check whether matplotlib is installed on outreach.

screen shot 2018-08-21 at 21 27 08

I am a bit confused what output is there from the script simple frap - maybe this is not dealt with in this PR - but if yes, why is the script there on eel with no output to show ?

@pwalczysko
Copy link
Member

This still works fine, even on outreach, after I have manually installed the scripts there. (note that I have to solve the ansible problem on outreach tomorrow with @manics as inticated in the chat ).

The absence of the FRAP graph panel in the new figure suggests though that even on outreach, there is no matplotlib installed. Is it a question of adding the installation to the playbook via pypi @manics ?)

@pwalczysko
Copy link
Member

The font in the created graphs (the axis labels) is really tiny - could we get a bigger one please ?
I have to zoom in the figure to the max to be able to show something

screen shot 2018-08-24 at 14 24 55

@pwalczysko
Copy link
Member

when I start simple frap with figure script I get in the UI

screen shot 2018-08-24 at 14 54 42

That is a bit confusing (I suppose both simple frap and simple frap with figure somehow share the same UI bit ?

@will-moore
Copy link
Member Author

@pwalczysko UI name fixed in ee94c1d

@pwalczysko
Copy link
Member

RFE:

  • simple frap with figure creates a figure -> intuitive
  • simple frap creates a figure as well -> anything but intuitive

The difference between the two scripts is not whether or not they create an OMERO.figure, but rather, whether or not they create a new image with the FRAP graph on it (and add it to the figure).

@pwalczysko
Copy link
Member

Other than #32 (comment) confusion, it works as expected here. Note that all should be now uploaded to outreach, no need to upload scripts manually there anymore. The playbook will be adjusted once this (and other PRs) are merged (and also when the Kymograph is sorted out)

@will-moore
Copy link
Member Author

will-moore commented Aug 27, 2018

@pwalczysko Apologies, I think the confusion at #32 (comment) was because when I first opened this PR I uploaded the modified "simple_frap.py" script to outreach with figure creation. Then I removed figure creation from that script but did not update on outreach.

@will-moore
Copy link
Member Author

@pwalczysko Updated simple_frap.py on outreach now.

@pwalczysko
Copy link
Member

Works as expected. Ready to merge FMPOV

@jburel jburel merged commit bf4c930 into ome:master Aug 30, 2018
jburel added a commit to jburel/training-scripts that referenced this pull request May 21, 2020
jburel added a commit to jburel/training-scripts that referenced this pull request May 29, 2020
jburel added a commit to jburel/training-scripts that referenced this pull request May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants