keflavich / cube-line-extractor

4 stars 1 forks source link

First Step in Readme.md Still Correct? #32

Closed jmangum closed 2 years ago

jmangum commented 2 years ago

I don't now recall what the first step in the Readme.md is referring to:

[optional] Use ds9 regions to select spatial regions to process (This should not be used, since it is not supported in later steps)

We use cuberegion and cutoutcuberegion, which sounds like this option. I don't think that the warning about it not working is correct any more, though.

jmangum commented 2 years ago

Checked CubeLineMoment and I think that this warning about ds9 regions to select spatial regions to process not working is out-of-date. The cuberegion and cutoutcuberegion ds9 files are used to mask cube and cutoutcube. For example:

    # cut out a region that only includes the Galaxy (so we don't have to worry
    # about masking later)
    if cuberegion is not None:
        try:
            cube = cube.subcube_from_regions(regions.read_ds9(cuberegion))
        except AttributeError:
            cube = cube.subcube_from_regions(regions.Regions.read(cuberegion))

Will fix this with next README.md update.