GitLab system status is available here and here

Commit fa7e35bf authored by Ethan Yeung's avatar Ethan Yeung
Browse files

put files in new location

parent 9d4c96b3
%% Cell type:code id:6fad088d tags:
``` python
import numpy as np
import sep
```
%% Cell type:code id:11230211 tags:
``` python
from astropy.io import fits
import matplotlib.pyplot as plt
from matplotlib import rcParams
%matplotlib inline
rcParams['figure.figsize'] = [10., 8.]
```
%% Cell type:code id:ed382cbb tags:
``` python
data = fits.open("../image.fits")
```
%% Output
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Input In [8], in <cell line: 1>()
----> 1 data = fits.open("../image.fits")
File ~/.local/lib/python3.10/site-packages/astropy/io/fits/hdu/hdulist.py:176, in fitsopen(name, mode, memmap, save_backup, cache, lazy_load_hdus, ignore_missing_simple, **kwargs)
173 if not name:
174 raise ValueError(f'Empty filename: {name!r}')
--> 176 return HDUList.fromfile(name, mode, memmap, save_backup, cache,
177 lazy_load_hdus, ignore_missing_simple, **kwargs)
File ~/.local/lib/python3.10/site-packages/astropy/io/fits/hdu/hdulist.py:411, in HDUList.fromfile(cls, fileobj, mode, memmap, save_backup, cache, lazy_load_hdus, ignore_missing_simple, **kwargs)
399 @classmethod
400 def fromfile(cls, fileobj, mode=None, memmap=None,
401 save_backup=False, cache=True, lazy_load_hdus=True,
402 ignore_missing_simple=False, **kwargs):
403 """
404 Creates an `HDUList` instance from a file-like object.
405
(...)
408 documentation for details of the parameters accepted by this method).
409 """
--> 411 return cls._readfrom(fileobj=fileobj, mode=mode, memmap=memmap,
412 save_backup=save_backup, cache=cache,
413 ignore_missing_simple=ignore_missing_simple,
414 lazy_load_hdus=lazy_load_hdus, **kwargs)
File ~/.local/lib/python3.10/site-packages/astropy/io/fits/hdu/hdulist.py:1071, in HDUList._readfrom(cls, fileobj, data, mode, memmap, cache, lazy_load_hdus, ignore_missing_simple, **kwargs)
1068 if fileobj is not None:
1069 if not isinstance(fileobj, _File):
1070 # instantiate a FITS file object (ffo)
-> 1071 fileobj = _File(fileobj, mode=mode, memmap=memmap, cache=cache)
1072 # The Astropy mode is determined by the _File initializer if the
1073 # supplied mode was None
1074 mode = fileobj.mode
File ~/.local/lib/python3.10/site-packages/astropy/utils/decorators.py:546, in deprecated_renamed_argument.<locals>.decorator.<locals>.wrapper(*args, **kwargs)
543 msg += f'\n Use {alternative} instead.'
544 warnings.warn(msg, warning_type, stacklevel=2)
--> 546 return function(*args, **kwargs)
File ~/.local/lib/python3.10/site-packages/astropy/io/fits/file.py:175, in _File.__init__(self, fileobj, mode, memmap, overwrite, cache)
173 self._open_fileobj(fileobj, mode, overwrite)
174 elif isinstance(fileobj, (str, bytes)):
--> 175 self._open_filename(fileobj, mode, overwrite)
176 else:
177 self._open_filelike(fileobj, mode, overwrite)
File ~/.local/lib/python3.10/site-packages/astropy/io/fits/file.py:564, in _File._open_filename(self, filename, mode, overwrite)
561 ext = os.path.splitext(self.name)[1]
563 if not self._try_read_compressed(self.name, magic, mode, ext=ext):
--> 564 self._file = fileobj_open(self.name, IO_FITS_MODES[mode])
565 self.close_on_error = True
567 # Make certain we're back at the beginning of the file
568 # BZ2File does not support seek when the file is open for writing, but
569 # when opening a file for write, bz2.BZ2File always truncates anyway.
File ~/.local/lib/python3.10/site-packages/astropy/io/fits/util.py:388, in fileobj_open(filename, mode)
378 def fileobj_open(filename, mode):
379 """
380 A wrapper around the `open()` builtin.
381
(...)
385 a raw random-access file reader.
386 """
--> 388 return open(filename, mode, buffering=0)
FileNotFoundError: [Errno 2] No such file or directory: '../image.fits'
%% Cell type:code id:6c7086d0 tags:
``` python
```
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment