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

Create CASA LEL images dynamically #665

Closed
pford opened this issue Nov 25, 2020 · 6 comments · Fixed by #1015
Closed

Create CASA LEL images dynamically #665

pford opened this issue Nov 25, 2020 · 6 comments · Fixed by #1015
Assignees
Labels
casa Issue due to casacore implementation enhancement New feature or request requiring frontend this backend issue requires work in both frontend and backend
Milestone

Comments

@pford
Copy link
Collaborator

pford commented Nov 25, 2020

LEL images are created dynamically. The frontend will have an interface (similar to the CASA viewer) where one can enter the mathematical expression. The frontend will send the expression to the backend, which will create and open the LEL image.

https://casadocs.readthedocs.io/en/stable/notebooks/image_analysis.html?highlight=LEL#Lattice-Expression-Language

Requires CARTAvis/carta-frontend#1264

@pford pford added enhancement New feature or request requiring frontend this backend issue requires work in both frontend and backend labels Nov 25, 2020
@pford pford changed the title Create CASA LEL images Create CASA LEL images dynamically Nov 25, 2020
@kswang1029 kswang1029 added this to the v3.0b-2 milestone Jul 19, 2021
@kswang1029 kswang1029 removed this from the v3.0b-2 milestone Nov 9, 2021
@kswang1029 kswang1029 assigned pford and unassigned jolopezl Jan 5, 2022
@kswang1029 kswang1029 added this to the v3.0b-3 milestone Jan 9, 2022
@pford
Copy link
Collaborator Author

pford commented Feb 7, 2022

LEL expressions do not work for HDF5 images because casacore::ImageExprParse uses casacore::ImageOpener to test for a valid image name in the expression. ImageOpener identifies our images as HDF5 but uses casacore::HDF5Image, which fails with the IDIA schema. There is no way to work around this in the bison-based parser, and no easy way to implement a parser in CARTA for the complex LEL syntax. Our options are: (1) do not support LEL for HDF5, or (2) open pull request in casacore to check open function map first for casacore-supported images such as HDF5, rather than default to casacore::HDF5Image.

@kswang1029
Copy link
Contributor

kswang1029 commented Feb 8, 2022

@jott3077 @veggiesaurus do you think it is okay not to support LEL for the hdf5 format? The new LEL generated cube would need to have meta data, swizzled cube and mip maps. So potentially the LEL cube generation could take a long time compared to other supported image formats

@pford
Copy link
Collaborator Author

pford commented Feb 8, 2022

@kswang1029 the generated image would be casacore::ImageExpr, with HDF5Lattice for data access (if that part works). But as you point out, this would lose the extra HDF5-IDIA features.

@pford pford added casa Issue due to casacore implementation question Further information is requested labels Feb 8, 2022
@pford
Copy link
Collaborator Author

pford commented Feb 8, 2022

Correction: ImageExpr saved to CASA format is saved as an LEL image, else as FITS image. These seem to be the only supported types for SaveFile.

@pford
Copy link
Collaborator Author

pford commented Feb 9, 2022

I just opened a casacore PR to change ImageOpener so that CartaHdf5Image can be used with the ImageExprParser and the parsing succeeds. With this change installed locally and using TestExprImage, I verified that an LEL expression with an HDF5 image opens as ImageExpr in ExprLoader.

@pford pford removed the question Further information is requested label Feb 24, 2022
@pford
Copy link
Collaborator Author

pford commented Feb 24, 2022

casacore PR has been merged. casa6 PR to update casacore is open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
casa Issue due to casacore implementation enhancement New feature or request requiring frontend this backend issue requires work in both frontend and backend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants