Actions
Feature #14378
openSpeed up download of CTF data with beam tilt
Start date:
02/23/2023
Due date:
% Done:
0%
Estimated time:
Deliverable:
Description
- move beam tilt queries out of loop and into main CTF query to significantly speed up this download
- for microscopes with no beam tilt-image shift calibration, puts raw image shift values into beam tilt so they can still be grouped by tiltgroup_wrangler.py
Updated by William Rice almost 2 years ago
- Description updated (diff)
- added same speed-up to download of grouped CTF data from tiltgroup_wrangler_cli.py
Updated by William Rice almost 2 years ago
- added changes to config.php.template to define temporary directories since this was also needed
- variables put into the ctf report php
- also added a definition to use a python different from the system python, used for downloading ctf grouped data
Updated by Anchi Cheng almost 2 years ago
- Status changed from New to Assigned
- Assignee set to William Rice
Hi, Bill,
Can you add a default on these assignments that is back compatible ? Something like this:
$temp_dir = defined(TEMP_DIR) ? TEMP_DIR: "/tmp/";
Updated by William Rice almost 2 years ago
This seems surprisingly difficult to get working. I have tried
and tried tests using functions empty(), isset(), and defined().
None seem to let me have it use the TEMP_DIR variable when it is defined or a default if it is not defined.
$temp_dir = TEMP_DIR; $temp_dir = empty($temp_dir) ? $temp_dir:"/tmp/";
and tried tests using functions empty(), isset(), and defined().
None seem to let me have it use the TEMP_DIR variable when it is defined or a default if it is not defined.
- empty($temp_dir) is true even when TEMP_DIR is defined.
- isset($temp_dir) is true even when TEMP_DIR is not defined.
- defined($temp_dir) is true even when TEMP_DIR is not defined.
Updated by Anchi Cheng almost 2 years ago
Does my example work ? WIthout $, TEMP_DIR is a constant in php and can be evaluated through "defined". When it is false, it is not defined in config.php and therefore $temp_dir (a variable) is assigned to "/tmp/" which is what I called default.
Updated by William Rice almost 2 years ago
No, it evaluates as false. I was hoping that a normal variable would work.
Updated by William Rice almost 2 years ago
Sorry, figured it out. Needs to be in quotes for the test
$temp_dir = defined("TEMP_DIR") ? TEMP_DIR: "/tmp/";
Updated by Anchi Cheng almost 2 years ago
found the same myself. Sorry about the bad example.
Actions