Project

General

Profile

Actions

Feature #14378

open

Speed up download of CTF data with beam tilt

Added by William Rice about 1 year ago. Updated about 1 year ago.

Status:
Assigned
Priority:
Normal
Assignee:
Category:
-
Target version:
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
Actions #1

Updated by William Rice about 1 year ago

  • Description updated (diff)
  • added same speed-up to download of grouped CTF data from tiltgroup_wrangler_cli.py
Actions #2

Updated by William Rice about 1 year 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
Actions #3

Updated by Anchi Cheng about 1 year 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/";

Actions #4

Updated by William Rice about 1 year ago

This seems surprisingly difficult to get working. I have tried
$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.
Actions #5

Updated by Anchi Cheng about 1 year 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.

Actions #6

Updated by William Rice about 1 year ago

No, it evaluates as false. I was hoping that a normal variable would work.

Actions #7

Updated by William Rice about 1 year ago

Sorry, figured it out. Needs to be in quotes for the test

$temp_dir = defined("TEMP_DIR") ? TEMP_DIR: "/tmp/";

Actions #8

Updated by Anchi Cheng about 1 year ago

found the same myself. Sorry about the bad example.

Actions

Also available in: Atom PDF