×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Date-based subfolder format

  • Posts: 54
  • Thank you received: 5
Hi everybody,

I'm wondering whether there is a simple way in EKOS to group several nights correction and light frames in a date-based subfolder style.

For example: Target/Date/Type/Filter/Filename

The filename format can be adjusted in the Capture module, but the only time related tag (%D) includes the time of acquisition... which makes a mess.

Is there a way to avoid using post-acquisition scripting (which I'm terrible at)?
8 months 3 weeks ago #94548

Please Log in or Create an account to join the conversation.

  • Posts: 1187
  • Thank you received: 370
Typically over night the date changes. What is your intention behind, how should it work?
8 months 3 weeks ago #94549

Please Log in or Create an account to join the conversation.

  • Posts: 54
  • Thank you received: 5

Replied by Massimo on topic Date-based subfolder format

Hi Wolfgang, you are right, probably if I state the final goal it's better.

Basically, I'd like to create a subfolder structure that allows me to match Flat and Light frames over different sessions. In order to easily feed them to WBPP in Pixinsight, following the instructions here:


I'm fairly certain this is a frequent issue that experts have already solved.

I would like a subdirectory of the type: "Target/Session_number/Type/Filter/Filename" in order to use Session_number as a keyword to match Flats and Light frames.
I reasoned that using the Date as the "Session_number" might work. However, as you properly pointed out, this would result in a mismatch for frames collected after midnight.

Is there a smarter way to get this using the scheduler?
8 months 3 weeks ago #94555

Please Log in or Create an account to join the conversation.

  • Posts: 211
  • Thank you received: 30
Hi Massimo,

I also use keywords in WBPP - I probably have watched the same videos you have from the looks of it! I don't use folders for each night/session but instead use a keyword in the file name. In the capture module, in the file settings area, you can add arbitrary text to the file name that EKOS saves. For example you can insert something like "Night_1" for the first night of imaging. The next night you shoot you'll need to increment the "1" to a "2" and so on. If you do this for both your lights and flats, they'll have the session name imbedded in the file. Your resulting directory structure will have, for example, all the red filter light images for all the nights in the light/red folder - no subfolders for each session. The same will be true for the other filters as well as the flat frames. When you first bring them into WBPP, they'll all be grouped together until you add the keyword you used to WBPP's Grouping Keywords. Then all the lights and flats for each night will be properly associated with each other.

It would be nice if there was an input in EKOS for session/night so you don't have to edit this custom text (which is easy to forget sometimes) but, unless you are running into a file name size limitation, I don't think having folders for each session is needed.
8 months 3 weeks ago #94557

Please Log in or Create an account to join the conversation.

  • Posts: 54
  • Thank you received: 5

Replied by Massimo on topic Date-based subfolder format

Hello, Fred. Thank you for your advice.

As you mentioned, the issue is remembering to change the keyword. Because I use the scheduler for automatic acquisition, the file setting of the employed sequence file must be adjusted each time. If the acquisition sequence is sophisticated, such as using many filters, this can be time-consuming and error-prone.

As you suggested, instead of splitting everything into directories, adding a keyword and "counter" to the file name for the session is sufficient. I was thinking of using subdirs to make picture inspections like blinking easier. But I recognize it's pointless.

What drives me insane is that I'm confident that the scheduler is already capable of doing so, or that an extremely simple script should be able to handle the situation...
8 months 3 weeks ago #94558

Please Log in or Create an account to join the conversation.

  • Posts: 1187
  • Thank you received: 370
Massimo,
I have a slightly different workflow for multi-night targets. I leave all frames of a target on the machine where KStars is running. And after each night, I sync all frames from the last night to a directory with the evening date as directory name. The script is a shell script:
#!/bin/bash
 
HOST=star-nuc
 
DATE_OPT=()
#DATE_OPT=("--date='1 day ago'")
#insure that if we cross midnight we keep the old date
if [ `date +"%H"` -lt 12 ]; then
    DATE_OPT=("--date='1 day ago'")
fi
 
YEAR=`eval date ${DATE_OPT[@]} +"%Y"`
MONTH=`eval date ${DATE_OPT[@]} +"%m"`
DAY=`eval date ${DATE_OPT[@]} +"%d"`
 
# create sync directory
FRAMESDIR="$HOME/sterne/$YEAR/$YEAR-$MONTH-${DAY}_sterne"
# create the directory where PI places its results
mkdir -p "$FRAMESDIR/00_prep"
 
cd "$FRAMESDIR"
 
RSYNC_OPT=(" -Pprtm"  "--exclude" "\*$((YEAR-2))-\*"  "--exclude" "\*$((YEAR-1))-\*")
 
# filter month
if [ $MONTH -gt 9 ]; then
    RSYNC_OPT+=("--exclude" "\*$YEAR-\[0-$((${MONTH:0:1}-1))\]\*")
fi
if [ ${MONTH:1:1} -gt 0 ]; then
    RSYNC_OPT+=("--exclude" "\*$YEAR-${MONTH:0:1}\[0-$((${MONTH:1:1}-1))\]-\*")
fi
# filter day
if [ $DAY -gt 9 ]; then
    RSYNC_OPT+=("--exclude" "\*$YEAR-$MONTH-\[0-$((${DAY:0:1}-1))\]\*")
fi
if [ ${DAY:1:1} -gt 0 ]; then
    RSYNC_OPT+=("--exclude" "\*$YEAR-$MONTH-${DAY:0:1}\[0-$((${DAY:1:1}-1))\]\*")
fi
 
#filter current day
RSYNC_OPT+=("--exclude" "\*$YEAR-$MONTH-${DAY}T0\*")
 
#run!
eval rsync "${RSYNC_OPT[@]}" $HOST:Bilder/ .

HTH
Wolfgang
8 months 3 weeks ago #94559

Please Log in or Create an account to join the conversation.

  • Posts: 54
  • Thank you received: 5

Replied by Massimo on topic Date-based subfolder format

Thanks a lot Wolfgang, even if that is not my definition of an "extremely simple script" ;-) I'll try to digest it and figure out how to incorporate it into my system.
8 months 3 weeks ago #94568

Please Log in or Create an account to join the conversation.

Time to create page: 0.610 seconds