Skip to content

Breizorro: Problem in writing outfile #786

@rramij

Description

@rramij

I am trying to make mask with breizorro.

# Make mask using breizorro
recipe.add("cab/breizorro", "test_mask", {
	"restored-image": "initial_image-MFS-image.fits",
	"threshold": 6.5,
	"boxsize": 50,
	"number-islands": True,
	"make-binary": True,
	"fill-holes": True,
	"outfile": "Test_breizorro_mask.fits"
	}, input=OUTPUT, output=OUTPUT, label="test mask")

But it is showing error at the time of writing the output file.

breizorro.breizorro - 2023-08-14 18:46:39,691 INFO - Welcome to breizorro
breizorro.breizorro - 2023-08-14 18:46:39,768 INFO - Version: 0.1.0
breizorro.breizorro - 2023-08-14 18:46:39,768 INFO - Usage: breizorro --help
breizorro.breizorro - 2023-08-14 18:46:39,769 INFO - Reading /stimela_mount/input/initial_image-MFS-image.fits data
breizorro.breizorro - 2023-08-14 18:46:39,871 INFO - Generating mask using threshold 6.5
breizorro.breizorro - 2023-08-14 18:46:39,871 INFO - Generating noise map
breizorro.breizorro - 2023-08-14 18:46:48,264 INFO - Median noise value is 1.8788927263813093e-05
breizorro.breizorro - 2023-08-14 18:46:48,423 INFO - (Re)numbering islands
breizorro.breizorro - 2023-08-14 18:46:48,779 INFO - Number of islands: 372
breizorro.breizorro - 2023-08-14 18:46:48,779 INFO - Converting mask to binary
breizorro.breizorro - 2023-08-14 18:46:48,820 INFO - Filling closed regions
Traceback (most recent call last):
  File "/usr/local/bin/breizorro", line 5, in <module>
    main()
  File "/usr/local/lib/python3.6/dist-packages/breizorro/breizorro.py", line 355, in main
    shutil.copyfile(input_file, out_mask_fits)  # to provide a template
  File "/usr/lib/python3.6/shutil.py", line 122, in copyfile
    copyfileobj(fsrc, fdst)
  File "/usr/lib/python3.6/shutil.py", line 82, in copyfileobj
    fdst.write(buf)
OSError: [Errno 28] No space left on device
Traceback (most recent call last):
  File "/stimela_mount/code/run.py", line 39, in <module>
    subprocess.check_call(shlex.split(_runc))
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['breizorro', '--restored-image', '/stimela_mount/input/initial_image-MFS-image.fits', '--threshold', '6.5', '--boxsize', '50', '--number-islands', '--make-binary', '--fill-holes', '--outfile', 'Test_breizorro_mask.fits']' returned non-zero exit status 1.

However, there is no lack of space in the disk.

### THESE ARE YOUR DISK QUOTA USAGES
     Filesystem   space   quota   limit   grace   files   quota   limit   grace
          /home   8104G  10189G  10189G            350k       0       0        
###

Furthermore, if I comment out the "outfile" parameter.

 # Make mask using breizorro
recipe.add("cab/breizorro", "test_mask", {
	"restored-image": "initial_image-MFS-image.fits",
	"threshold": 6.5,
	"boxsize": 50,
	"number-islands": True,
	"make-binary": True,
	"fill-holes": True,
#	"outfile": "Test_breizorro_mask.fits"
	}, input=OUTPUT, output=OUTPUT, label="test mask")

The error changes to

breizorro.breizorro - 2023-08-14 18:54:50,816 INFO - Welcome to breizorro
breizorro.breizorro - 2023-08-14 18:54:50,892 INFO - Version: 0.1.0
breizorro.breizorro - 2023-08-14 18:54:50,892 INFO - Usage: breizorro --help
breizorro.breizorro - 2023-08-14 18:54:50,893 INFO - Reading /stimela_mount/input/initial_image-MFS-image.fits data
breizorro.breizorro - 2023-08-14 18:54:50,994 INFO - Generating mask using threshold 6.5
breizorro.breizorro - 2023-08-14 18:54:50,994 INFO - Generating noise map
breizorro.breizorro - 2023-08-14 18:54:58,019 INFO - Median noise value is 1.8788927263813093e-05
breizorro.breizorro - 2023-08-14 18:54:58,181 INFO - (Re)numbering islands
breizorro.breizorro - 2023-08-14 18:54:58,537 INFO - Number of islands: 372
breizorro.breizorro - 2023-08-14 18:54:58,537 INFO - Converting mask to binary
breizorro.breizorro - 2023-08-14 18:54:58,580 INFO - Filling closed regions
Traceback (most recent call last):
  File "/usr/local/bin/breizorro", line 5, in <module>
    main()
  File "/usr/local/lib/python3.6/dist-packages/breizorro/breizorro.py", line 355, in main
    shutil.copyfile(input_file, out_mask_fits)  # to provide a template
  File "/usr/lib/python3.6/shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
OSError: [Errno 30] Read-only file system: '/stimela_mount/input/initial_image-MFS-image.mask.fits'
Traceback (most recent call last):
  File "/stimela_mount/code/run.py", line 39, in <module>
    subprocess.check_call(shlex.split(_runc))
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['breizorro', '--restored-image', '/stimela_mount/input/initial_image-MFS-image.fits', '--threshold', '6.5', '--boxsize', '50', '--number-islands', '--make-binary', '--fill-holes']' returned non-zero exit status 1.
cd /home/rramij/Work_Dir/A85_700MHz/GWB/GMRT_DI_pipe_run/Useful/selfcal/2run/.stimela_workdir-1692032083524032 && singularity run --workdir /home/rramij/Work_Dir/A85_700MHz/GWB/GMRT_DI_pipe_run/Useful/selfcal/2run/.stimela_workdir-1692032083524032 --containall returns error code 1

Please help me resolve the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions