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

Need to make transposed dataarrays for Eureka #5

Open
taylorbell57 opened this issue Jun 11, 2024 · 0 comments
Open

Need to make transposed dataarrays for Eureka #5

taylorbell57 opened this issue Jun 11, 2024 · 0 comments

Comments

@taylorbell57
Copy link
Contributor

As mentioned in kevin218/Eureka#603 (comment), there is currently an issue with the connection between Eureka! and Astraeus. The required code to permit custom S3 inputs into Eureka's Stage 4 includes this snippet:

    "custom_dataset['time'] = time\n",
    "custom_dataset['time'].attrs['time_units'] = time_units\n",
    "custom_dataset['x'] = x\n",
    "custom_dataset['optspec'] = (['time', 'x'], optspec)\n",
    "custom_dataset['optspec'].attrs['flux_units'] = flux_units\n",
    "custom_dataset['optspec'].attrs['time_units'] = time_units\n",
    "custom_dataset['optspec'].attrs['wave_units'] = wave_units\n",
    "custom_dataset['opterr'] = (['time', 'x'], opterr)\n",
    "custom_dataset['opterr'].attrs['flux_units'] = flux_units\n",
    "custom_dataset['opterr'].attrs['time_units'] = time_units\n",
    "custom_dataset['opterr'].attrs['wave_units'] = wave_units\n",
    "custom_dataset['wave_1d'] = (['x'], wave_1d)\n",
    "custom_dataset['wave_1d'].attrs['wave_units'] = wave_units"

I tried using Astraeus' built-in functions to avoid having to explicitly do all that, but there is an issue with doing so. The SpecData files should have the format optspec = (time, x), but using Astraeus' makeLCDA function on the optspec array I get the transpose: (wavelength, time). In addition to the transpose issue, I'm also not totally sure whether having wavelength instead of x would break things within Eureka!'s Stage 4. Using the makeFluxLikeDA function also doesn't work since it requires that the input array be three dimensional (time, x, y) while we only have/want (time, x).

One possibility is that we may not be using Astraeus functions when making our Stage 3 outputs, but I believe we are, and the fact that the makeFluxLikeDA function puts time as the first index while makeLCDA puts time as the last index suggests to me that the issue is the result of inconsistencies in the formatting/organization of Astraeus' arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant