<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help on opening hdf5 files in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824456#M100403</link>
    <description>&lt;P&gt;Hi Jim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is an example of this at&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/18.1/index.shtml#page/jmp/import-data.shtml" target="_blank"&gt;https://www.jmp.com/support/help/en/18.1/index.shtml#page/jmp/import-data.shtml&lt;/A&gt;&amp;nbsp;under the section "Import HDF5 Files".&amp;nbsp; Admittedly a bit challenging to find, but it does show up in Google.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Brian&lt;/P&gt;</description>
    <pubDate>Thu, 19 Dec 2024 15:17:08 GMT</pubDate>
    <dc:creator>briancorcoran</dc:creator>
    <dc:date>2024-12-19T15:17:08Z</dc:date>
    <item>
      <title>Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824362#M100386</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use JMP to open a hdf5 file using a script. &amp;nbsp;I can successfully open it using the Open() command:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;blobpath = "/Documents/myblob";
dtblob_lis = Open(blobpath);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but I get a pop-up asking which data set I'd like to open:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikles_0-1734559582775.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71396i29A835E83A1E34D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nikles_0-1734559582775.png" alt="nikles_0-1734559582775.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My question: is there an option in the Open() command I could use to specify which data set within the blob I wish to open, and avoid the pop-up? &amp;nbsp;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 22:18:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824362#M100386</guid>
      <dc:creator>nikles</dc:creator>
      <dc:date>2024-12-18T22:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824372#M100387</link>
      <description>&lt;P&gt;... and is there a way to record the action?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 22:58:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824372#M100387</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-12-18T22:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824373#M100388</link>
      <description>&lt;P&gt;as an alternative: use h5py.&lt;BR /&gt;very smooth sinde JMP18 : )&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 22:59:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824373#M100388</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-12-18T22:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824374#M100389</link>
      <description>&lt;P&gt;That was the first thing I tried. &amp;nbsp;No, there is no apparent recording of actions in the log or in the table(s) that are created.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 23:00:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824374#M100389</guid>
      <dc:creator>nikles</dc:creator>
      <dc:date>2024-12-18T23:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824375#M100390</link>
      <description>&lt;P&gt;Unfortunately my org has not adopted JMP18 yet.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 23:06:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824375#M100390</guid>
      <dc:creator>nikles</dc:creator>
      <dc:date>2024-12-18T23:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824377#M100391</link>
      <description>&lt;P&gt;LearnBot: the same.&lt;BR /&gt;refreshingly honest : )&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1734565267266.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71397i9E2D57C4DCD7824B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1734565267266.png" alt="hogi_0-1734565267266.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 23:41:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824377#M100391</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-12-18T23:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824391#M100392</link>
      <description>&lt;P&gt;This is a guess but based on the discussion on&amp;nbsp;&lt;LI-MESSAGE title="Automate opening an hdf5 file" uid="248009" url="https://community.jmp.com/t5/Discussions/Automate-opening-an-hdf5-file/m-p/248009#U248009" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;Python Integration might be the answer.&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3022"&gt;@briancorcoran&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't have to use JMP's Python integration to manage file opening/conversion with Python, create a python script which you can run from command line (using Run Program())which takes inputs you need (file path at least), saves it as .csv and then open that .csv in JMP. That is how I used Python before JMP18 in JMP (and still do from time to time). You can of course try using JMP's Python integration in versions earlier than 18, but I wouldn't bother and would just run it from command line.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 05:18:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824391#M100392</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-12-19T05:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824437#M100400</link>
      <description>&lt;P&gt;You can open individual items within the HDF5 dataset by using a JSL list to specify the members to open.&amp;nbsp; For example, the following worked for me (specifying the file extension as well):&lt;BR /&gt;&lt;BR /&gt;open("d:\testdata\HDF5\hdf5data.h5", {"/g2/float"});&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case, it might look like:&lt;BR /&gt;&lt;BR /&gt;open("/Documents/myblob.h5", {"/CSIG_RAW_IMG_OFF/F0/FrameNumbers", "/CSIG_RAW_IMG_OFF/F0/Frames"});&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Brian Corcoran&lt;/P&gt;
&lt;P&gt;JMP Development&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 13:26:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824437#M100400</guid>
      <dc:creator>briancorcoran</dc:creator>
      <dc:date>2024-12-19T13:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824439#M100402</link>
      <description>&lt;P&gt;Brian,&lt;/P&gt;
&lt;P&gt;Where is this capability documented?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 13:47:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824439#M100402</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-12-19T13:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824456#M100403</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is an example of this at&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/18.1/index.shtml#page/jmp/import-data.shtml" target="_blank"&gt;https://www.jmp.com/support/help/en/18.1/index.shtml#page/jmp/import-data.shtml&lt;/A&gt;&amp;nbsp;under the section "Import HDF5 Files".&amp;nbsp; Admittedly a bit challenging to find, but it does show up in Google.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Brian&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 15:17:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824456#M100403</guid>
      <dc:creator>briancorcoran</dc:creator>
      <dc:date>2024-12-19T15:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824516#M100408</link>
      <description>&lt;P&gt;This is exactly the solution I was looking for. &amp;nbsp;Works. &amp;nbsp;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 16:57:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824516#M100408</guid>
      <dc:creator>nikles</dc:creator>
      <dc:date>2024-12-19T16:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824517#M100409</link>
      <description>&lt;P&gt;Ha.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 16:58:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824517#M100409</guid>
      <dc:creator>nikles</dc:creator>
      <dc:date>2024-12-19T16:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824522#M100411</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_2-1734629957662.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71432iEB6B645B708ED688/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_2-1734629957662.png" alt="hogi_2-1734629957662.png" /&gt;&lt;/span&gt;&amp;nbsp;vs.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1734629899220.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71430iEE1FE4B9AA752A05/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1734629899220.png" alt="hogi_0-1734629899220.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_1-1734629926501.png" style="width: 195px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71431iA8295B6232186187/image-dimensions/195x42?v=v2" width="195" height="42" role="button" title="hogi_1-1734629926501.png" alt="hogi_1-1734629926501.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 17:39:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/824522#M100411</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-12-19T17:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help on opening hdf5 files</title>
      <link>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/905708#M106408</link>
      <description>&lt;P&gt;I was looking for faster &amp;amp; more efficient ways of transferring data between Python and JMP 17, because both pandas and JMP are quite slow at reading/writing CSV, and even the GetTable() function seems to use CSV under the hood, at least in JMP 17. Pandas' to_hdf function doesn't work because instead of storing string data in a HDF-compliant dataset, it instead uses some custom shenanigans to store a Numpy array as a string, which is not only space inefficient but locks you in to reading it with Python.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote a custom proof-of-concept Python code that saves a .h5 table using h5py, and JSL code that reads the table and reconstructs the original table from the separate datasets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;import pandas as pd
import numpy as np
from pathlib import Path
import h5py
from time import perf_counter


last_time = perf_counter()
compression = "gzip"


def log_time(msg):
    global last_time
    current_time = perf_counter()
    elapsed_time = current_time - last_time
    print(f"{elapsed_time:1.3f} s: {msg}")
    last_time = current_time

# read dataframe (just for the development example)
df = pd.read_csv(Path(__file__).parent / "my_table.csv")
log_time("Read df")

string_columns = df.select_dtypes(include=["object"]).columns
# min_itemsize = {col: df[col].str.len().max() for col in string_columns}
max_string_length = np.max([df[col].str.len().max() for col in string_columns]) if len(string_columns) &amp;gt; 0 else 1
max_string_column_length = np.max([len(col) for col in string_columns]) if len(string_columns) &amp;gt; 0 else 1
log_time("max_string_length =" + str(max_string_length))

float_columns = df.select_dtypes(include=["float"]).columns
max_float_column_length = np.max([len(col) for col in float_columns]) if len(float_columns) &amp;gt; 0 else 1
log_time("max_float_column_length =" + str(max_float_column_length))
int_columns = df.select_dtypes(include=["int"]).columns
max_int_column_length = np.max([len(col) for col in int_columns]) if len(int_columns) &amp;gt; 0 else 1
log_time("max_int_column_length =" + str(max_int_column_length))

max_column_length = np.max(
    [max_float_column_length, max_int_column_length, max_string_column_length]
)
log_time("max_column_length =" + str(max_column_length))

file = h5py.File(Path(__file__).parent / "sample.h5", "w")
log_time("Opened h5 file")
string_data = df[string_columns].astype(str).values
log_time("Converted string data to str")
string_data_ascii = np.array(
    [[s.encode("ascii", "ignore") for s in row] for row in string_data]
)
log_time("Converted string data to ascii")
file.create_dataset(
    "string_data",
    data=string_data_ascii,
    dtype=f"S{max_string_length}",
    compression=compression,
)
log_time("Created string_data dataset")
file.create_dataset(
    "string_columns",
    data=np.array(string_columns, dtype=f"S{max_string_column_length}"),
    compression=compression,
)
log_time("Created string_columns dataset")
file.create_dataset(
    "float_data", data=df[float_columns].values, dtype="f4", compression=compression
)
log_time("Created float_data dataset")
file.create_dataset(
    "float_columns",
    data=np.array(float_columns, dtype=f"S{max_float_column_length}"),
    compression=compression,
)
log_time("Created float_columns dataset")
file.create_dataset(
    "int_data", data=df[int_columns].values, dtype="i4", compression=compression
)
log_time("Created int_data dataset")
file.create_dataset(
    "int_columns",
    data=np.array(int_columns, dtype=f"S{max_int_column_length}"),
    compression=compression,
)
log_time("Created int_columns dataset")
file.create_dataset(
    "column_order",
    data=np.array(
        df.columns,
        dtype=f"S{max_column_length}",
    ),
    compression=compression,
)
log_time("Created column_order dataset")

file.flush()
file.close&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;CloseAll(datatables, nosave);
last_time = TickSeconds();
log_time = Function({msg},
	now = TickSeconds();
	print(Char(now - last_time) || " - " || Char(msg));
	last_time = now;
);
	
hdf5_file_path = "my_table.h5";
dataset_names = {
	// "/column_order",
	"/float_columns",
	"/float_data",
	"/int_columns",
	"/int_data",
	"/string_columns",
	"/string_data"
};
// Open the hdf file
hdf5_file = Open(hdf5_file_path, dataset_names, invisible);
log_time("Opened HDF5 file: " || hdf5_file_path);

// Get list 
// columns = As Column(DataTable("-column_order"), "Column 1"n) &amp;lt;&amp;lt; get as matrix;
string_columns = As Column(DataTable("-string_columns"), "Column 1"n) &amp;lt;&amp;lt; get as matrix;
float_columns = As Column(DataTable("-float_columns"), "Column 1"n) &amp;lt;&amp;lt; get as matrix;
int_columns = As Column(DataTable("-int_columns"), "Column 1"n) &amp;lt;&amp;lt; get as matrix;
Close(DataTable("-string_columns"), nosave);
Close(DataTable("-float_columns"), nosave);
Close(DataTable("-int_columns"), nosave);
log_time("Got columns");

dt_int = DataTable("-int_data");
ForEach({cname, i}, int_columns,
	Column(dt_int, "Column " || Char(i)) &amp;lt;&amp;lt; SetName(cname)
);
log_time("Assembled int table");

dt_float = DataTable("-float_data");
ForEach({cname, i}, float_columns,
	Column(dt_float, "Column " || Char(i)) &amp;lt;&amp;lt; SetName(cname)
);
log_time("Assembled float table");

dt_string = DataTable("-string_data");
ForEach({cname, i}, string_columns,
	Column(dt_string, "Column " || Char(i)) &amp;lt;&amp;lt; SetName(cname)
);
log_time("Assembled string table");

dt_string &amp;lt;&amp;lt; Update(
	With( dt_int ),
	Replace Columns in Main Table( None )
);
Close(dt_int, nosave);
dt_string &amp;lt;&amp;lt; Update(
	With( dt_float ),
	Replace Columns in Main Table( None )
);
Close(dt_float, nosave);
log_time("Combined table");

// For( i = N Items( columns ), i &amp;gt;= 1, i--,
// 	Eval( Parse( "combined_dt &amp;lt;&amp;lt; Move Selected Columns(\!"" || columns[i] || "\!"n, To first )" ) )
// );
// log_time("Moved columns");
dt_string &amp;lt;&amp;lt; SetName("my_table");
dt_string &amp;lt;&amp;lt; ShowWindow(1);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I disabled the code that attempts to reconstruct the original column order, because for wide tables, it's very very slow. Also, pls note that I didn't account for the case where there are no columns of a particular type. That'll require a little bit of extra work in the jsl side if you care about that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Results: For a data table with 80 rows and 115,791 columns, which would normally take pandas 20 seconds to save as csv and jmp 24 seconds to open, it took my script 1.7 seconds to save and JMP 11.5 seconds to open. Additionally, the file went down from 88.8 MB to 24.5 MB when using gzip compression. That's a total savings of 70% in terms of time, and 72% in terms of space.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 00:09:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-on-opening-hdf5-files/m-p/905708#M106408</guid>
      <dc:creator>jljmp</dc:creator>
      <dc:date>2025-10-03T00:09:53Z</dc:date>
    </item>
  </channel>
</rss>

