Skip to content

Commit

Permalink
Merge pull request #341 from pixlise/feature/em-import
Browse files Browse the repository at this point in the history
Printing args for BGT
  • Loading branch information
pnemere authored Nov 4, 2024
2 parents bc5cec3 + 856ba46 commit d081bcf
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion api/ws/handlers/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ func processEM(importId string, zipReader *zip.Reader, zippedData []byte, destBu

rsiUploaded := 0
for _, rsi := range rsis {
rxlPath, logPath, err := createBeamLocation(rsi, localTemp, logger)
rxlPath, logPath, err := createBeamLocation(filepath.Join(localTemp, rsi), localTemp, logger)
if err != nil {
// Don't fail on errors for these - we may have run beam location tool on some incomplete scan, so failure isn't terrible!
logger.Errorf("Beam location generation failed for RSI: %v. Error: %v", rsi, err)
Expand Down Expand Up @@ -683,6 +683,15 @@ func createBeamLocation(rsiPath string, outputBeamLocationPath string, logger lo
}*/
}

if _, err := os.Stat(bgtPath + "Geometry_PIXL_EM_Landing_25Jan2021.csv"); err != nil {
return "", "", errors.New("Calibration file not found")
}
if _, err := os.Stat(rsiPath); err != nil {
return "", "", errors.New("RSI not found")
}

fmt.Printf("Executing: %v %v %v %v %v %v", bgtPath+"BGT", bgtPath+"Geometry_PIXL_EM_Landing_25Jan2021.csv", rsiPath, outSurfaceTop, outRXL, outLog)

cmd := exec.Command(bgtPath+"BGT", bgtPath+"Geometry_PIXL_EM_Landing_25Jan2021.csv", rsiPath, outSurfaceTop, outRXL, outLog)

// var out bytes.Buffer
Expand Down

0 comments on commit d081bcf

Please sign in to comment.