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

Error using movefile() #432

Closed
YarinMS opened this issue Apr 9, 2024 · 9 comments
Closed

Error using movefile() #432

YarinMS opened this issue Apr 9, 2024 · 9 comments

Comments

@YarinMS
Copy link
Collaborator

YarinMS commented Apr 9, 2024

Pipeline runs on last02e fails when trying to move images to the failed directory.

image

In debug mode the arguments to movefile() seem correct:

Source = '/last02e/data1/archive/LAST.01.02.01/new/LAST.01.02.01_20230823.014746.906_clear_356+34_001_001_001_sci_raw_Image_1.fits'

Destination{Ifile} = '/last02e/data1/archive/LAST.01.02.01/failed/LAST.01.02.01_20230823.014746.906_clear_356+34_001_001_001_sci_raw_Image_1.fits'

  • AstroPack V2.1 is the current version on last02e.
@EranOfek
Copy link
Owner

EranOfek commented Apr 9, 2024 via email

@YarinMS
Copy link
Collaborator Author

YarinMS commented Apr 9, 2024

  1. Sorry,
    D.main('StopWhenDone',true,'StartJD',[21 08 2023],'EndJD',[24 08 2023],'SaveEpochProduct',{'Cat','Mask','Image',[]},'SelectKnownAsteroid',false)

  2. The image appears in the raw directory - /last02e/data1/archive/LAST.01.02.01/2023/08/22/raw

I used mv *.fits to the new directory before starting the pipeline, leaving the raw directory empty.

  • could it be that it didnt have enough time to move ? (the directory was empty using ls). Looks weird considering that the only images in the raw directory at the moment are images that have been processed by the pipeline 2nd iteration (v1 visitis).

@YarinMS
Copy link
Collaborator Author

YarinMS commented Apr 9, 2024

  • The pipeline fails in line 2546 : io.files.moveFiles(RawImageList, FN_Sci_Groups(Igroup).genFull('FullPath',FailedPath));

Debug mode suggest that the pipeline moves the visit to the raw folder before compiling this line.

@EranOfek
Copy link
Owner

EranOfek commented Apr 9, 2024 via email

@YarinMS
Copy link
Collaborator Author

YarinMS commented Apr 9, 2024

Let me pack it in one comment, by reproducing the error.

% Initilize pipeline object on last02e and load calib nearJD of 22/08/23.

D.main('StopWhenDone',true,'StartJD',[21 08 2023],'EndJD',[24 08 2023],'SaveEpochProduct',{'Cat','Mask','Image',[]})

image

Note that these images could be found in the 'new' directory at the start of the run:

image

Debuging the pipeline suggest that these files are moved to the 'raw' directory in line 2455 :
image

Visually confiriming (top20)
/last02e/data1/archive/LAST.01.02.01/2023/08/22/raw$:
image

The pipeline chooses to move the images to the failed directory (from 'new' and not from 'raw'...) only later on, at line 2546, the full error is:
image

Where io.files.moveFiles tries to move the images from new -> failed :
image

As I've mentioned. You can find these images in the raw directory.

  • Not sure if movefile() should change the source to the raw directory instead of the new or there is something deeper I'm not aware of.

@EranOfek
Copy link
Owner

EranOfek commented Apr 9, 2024 via email

@YarinMS
Copy link
Collaborator Author

YarinMS commented Apr 9, 2024

The images reduced successfully in the last Iteration

  1. It does not fail, Image looks ok. failed images looks great.
  2. line 2455 in D.main is responsible for copying the images from new/ to raw/ (See previous comment.)

@EranOfek
Copy link
Owner

The problem is likely due to the following:
The watch dog identify that the pipeline is down and brings it up and it is processing the data in new/
Then the background last-pipelin1 is moving the file, and when your pipeline reach this point the files are no longer in the new dir.

If this is the problem, the the simplest solution will be to create a new new/ dir - e.g., call it newYS
and in set the name of the new directory path in the DemonLAST object to this newYS dir.

@EranOfek
Copy link
Owner

The solution I suggested is not good enough - because the automatic process will copy the proc images to marvin over the existing v0 version...
The simplest solution is to change the BasePath to another directory - but you also have to verify with Arie that these processed files will not be copied to marvin.

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

No branches or pull requests

2 participants