Skip to content

Commit

Permalink
📝 Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Xen0Xys committed May 24, 2024
1 parent 50eb398 commit ad10dfd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,30 @@ aladin = Aladin()
aladin
```

## Widget limitations

Because some limitations of the widget framework, some operations need specific behaviors.

### Aladin Lite values

Some values need to be synchronized before their use, like:

- wcs

#### Example with the wcs value:

First cell:

```python
aladin.synchronize_wcs()
```

Second cell:

```python
print(aladin.wcs)
```

## Development installation

First, make sure you have installed jupyter in your python environnement: `pip install jupyter`.
Expand Down
4 changes: 2 additions & 2 deletions src/ipyaladin/aladin.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ def wcs(self) -> WCS:
"""
if self._wcs == {}:
raise ValueError(
"You need to call synchronize_wcs first and in "
"another Jupyter cell to get the WCS."
"You need to call synchronize_wcs before accessing the wcs attribute. "
"The WCS attribute need to be accessed from the next cell."
)
wcs = WCS(naxis=self._wcs["NAXIS"])
wcs.wcs.cdelt = [self._wcs["CDELT1"], self._wcs["CDELT2"]]
Expand Down

0 comments on commit ad10dfd

Please sign in to comment.