#2939: AHFinderDirect: range options for track_origin_source_x/y/z
Reporter:Jordan Nicoules
Status:new
Milestone:
Version:
Type:bug
Priority:minor
Component:EinsteinToolkit thorn

In AHFinderDirect param.ccl there is (same for y, z):

string track_origin_source_x[101] "grid scalar containing the x component of the origin estimate" STEERABLE=recover
{
  "" :: "don't use this feature"
  "[a-zA-Z_][a-zA-Z0-9_]*[:][:][a-zA-Z_][a-zA-Z0-9_]*(\[0-9+\])" :: "name of a grid scalar"
} ""

While mimicking this and testing in a thorn of my own, I realized that "" matches everything, so the second range is basically useless. Is it what is meant by "don't use this feature"? I think I rather understand it as "do not put nothing".

If this is not the intention, first something should be done about the empty string and default value. What's more, the range is actually incorrect (see explanation from GPT-5.4 in Copilot below; I'll let you judge the validity of the explanation, you know that better than me).

Possible fixes:

  1. For the default: for example use a "None" value, with some catch in AHFinderDirect_setup() that checks the variable name and returns an error. With a quick test, an unknown/wrong variable name would trigger an error somewhere in the execution of AHFinderDirect_find_horizons() anyway.

  2. For the actual range:

  "[a-zA-Z_][a-zA-Z0-9_]*[:][:][a-zA-Z_][a-zA-Z0-9_]*"                :: "name of a grid scalar without index"
  "[a-zA-Z_][a-zA-Z0-9_]*[:][:][a-zA-Z_][a-zA-Z0-9_]*\[[0-9][0-9]*\]" :: "name of a grid scalar with index"

(GPT's recommendation to separate the two patterns for clarity and portability, instead of trying to match both at the sam

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2939/ahfinderdirect-range-options-for