Extracting data and saving data from hdf5 Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Moderator Election Q&A - Questionnaire 2019 Community Moderator Election ResultsNetwork analysis classic datasetsAmalgamating multiple datasets with different variables codingTools to perform SQL analytics on 350TB of csv dataPeriodically executing a scraping script with PythonPlot RDD data using a pyspark dataframe from csv fileCan HDF5 be reliably written to and read from simultaneously by separate python processes?How to deal with large data setsHow to download images and bounding boxes from imageNet?How to use same encode label with same value used in trainingFeature name extraction directly from dataset

Is there any avatar supposed to be born between the death of Krishna and the birth of Kalki?

Diagram with tikz

ListPlot join points by nearest neighbor rather than order

Do I really need recursive chmod to restrict access to a folder?

Is the Standard Deduction better than Itemized when both are the same amount?

If a contract sometimes uses the wrong name, is it still valid?

Were Kohanim forbidden from serving in King David's army?

Is the argument below valid?

3 doors, three guards, one stone

Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?

What's the purpose of writing one's academic bio in 3rd person?

What are the possible ways to detect skin while classifying diseases?

How do I keep my slimes from escaping their pens?

Latex gives error undefined control sequence table

Why is "Captain Marvel" translated as male in Portugal?

Why are there no cargo aircraft with "flying wing" design?

Why don't the Weasley twins use magic outside of school if the Trace can only find the location of spells cast?

Does surprise arrest existing movement?

Do you forfeit tax refunds/credits if you aren't required to and don't file by April 15?

Antler Helmet: Can it work?

If 'B is more likely given A', then 'A is more likely given B'

What would be the ideal power source for a cybernetic eye?

Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?

Why is black pepper both grey and black?



Extracting data and saving data from hdf5



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Moderator Election Q&A - Questionnaire
2019 Community Moderator Election ResultsNetwork analysis classic datasetsAmalgamating multiple datasets with different variables codingTools to perform SQL analytics on 350TB of csv dataPeriodically executing a scraping script with PythonPlot RDD data using a pyspark dataframe from csv fileCan HDF5 be reliably written to and read from simultaneously by separate python processes?How to deal with large data setsHow to download images and bounding boxes from imageNet?How to use same encode label with same value used in trainingFeature name extraction directly from dataset










1












$begingroup$


I have a hdf5 file, and I want to extract a part of the data and save it as the same format.



The data type is



DATATYPE H5T_IEEE_F32BE


So far I have successfully extracted the data using h5dump but it is in ascii format. I couldn't save it as the same hdf5 format. I saw there are several flags for saving as xml formats, but it doesn't work for me. I have tried using flags like -x or -d such as



h5dump -d variable -s 1 10 -X output.file input.file


It creates the output file, but it is an empty file.



edit: I need to do it using h5dump.










share|improve this question











$endgroup$
















    1












    $begingroup$


    I have a hdf5 file, and I want to extract a part of the data and save it as the same format.



    The data type is



    DATATYPE H5T_IEEE_F32BE


    So far I have successfully extracted the data using h5dump but it is in ascii format. I couldn't save it as the same hdf5 format. I saw there are several flags for saving as xml formats, but it doesn't work for me. I have tried using flags like -x or -d such as



    h5dump -d variable -s 1 10 -X output.file input.file


    It creates the output file, but it is an empty file.



    edit: I need to do it using h5dump.










    share|improve this question











    $endgroup$














      1












      1








      1





      $begingroup$


      I have a hdf5 file, and I want to extract a part of the data and save it as the same format.



      The data type is



      DATATYPE H5T_IEEE_F32BE


      So far I have successfully extracted the data using h5dump but it is in ascii format. I couldn't save it as the same hdf5 format. I saw there are several flags for saving as xml formats, but it doesn't work for me. I have tried using flags like -x or -d such as



      h5dump -d variable -s 1 10 -X output.file input.file


      It creates the output file, but it is an empty file.



      edit: I need to do it using h5dump.










      share|improve this question











      $endgroup$




      I have a hdf5 file, and I want to extract a part of the data and save it as the same format.



      The data type is



      DATATYPE H5T_IEEE_F32BE


      So far I have successfully extracted the data using h5dump but it is in ascii format. I couldn't save it as the same hdf5 format. I saw there are several flags for saving as xml formats, but it doesn't work for me. I have tried using flags like -x or -d such as



      h5dump -d variable -s 1 10 -X output.file input.file


      It creates the output file, but it is an empty file.



      edit: I need to do it using h5dump.







      dataset






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 2 at 8:40







      atrlrgn

















      asked Apr 1 at 16:01









      atrlrgnatrlrgn

      62




      62




















          1 Answer
          1






          active

          oldest

          votes


















          0












          $begingroup$

          You can always try using the h5py module in Python.



          import h5py

          # Load existing file
          filename = "myfile.hdf5"
          dataset = h5py.File(filename, "r")

          # Show keys
          [print(item) for item in dataset.items()]

          # Assuming that you want to select the first 10 rows of key "A"
          data = dataset["A"][:10]
          dataset.close()

          # Create the new dataset / file
          dataset2 = h5py.File("myfile2.hdf5", "w")
          dataset2.create_dataset("A", data)
          dataset2.close()





          share|improve this answer









          $endgroup$












          • $begingroup$
            thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
            $endgroup$
            – atrlrgn
            Apr 2 at 8:40











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "557"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48362%2fextracting-data-and-saving-data-from-hdf5%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0












          $begingroup$

          You can always try using the h5py module in Python.



          import h5py

          # Load existing file
          filename = "myfile.hdf5"
          dataset = h5py.File(filename, "r")

          # Show keys
          [print(item) for item in dataset.items()]

          # Assuming that you want to select the first 10 rows of key "A"
          data = dataset["A"][:10]
          dataset.close()

          # Create the new dataset / file
          dataset2 = h5py.File("myfile2.hdf5", "w")
          dataset2.create_dataset("A", data)
          dataset2.close()





          share|improve this answer









          $endgroup$












          • $begingroup$
            thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
            $endgroup$
            – atrlrgn
            Apr 2 at 8:40















          0












          $begingroup$

          You can always try using the h5py module in Python.



          import h5py

          # Load existing file
          filename = "myfile.hdf5"
          dataset = h5py.File(filename, "r")

          # Show keys
          [print(item) for item in dataset.items()]

          # Assuming that you want to select the first 10 rows of key "A"
          data = dataset["A"][:10]
          dataset.close()

          # Create the new dataset / file
          dataset2 = h5py.File("myfile2.hdf5", "w")
          dataset2.create_dataset("A", data)
          dataset2.close()





          share|improve this answer









          $endgroup$












          • $begingroup$
            thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
            $endgroup$
            – atrlrgn
            Apr 2 at 8:40













          0












          0








          0





          $begingroup$

          You can always try using the h5py module in Python.



          import h5py

          # Load existing file
          filename = "myfile.hdf5"
          dataset = h5py.File(filename, "r")

          # Show keys
          [print(item) for item in dataset.items()]

          # Assuming that you want to select the first 10 rows of key "A"
          data = dataset["A"][:10]
          dataset.close()

          # Create the new dataset / file
          dataset2 = h5py.File("myfile2.hdf5", "w")
          dataset2.create_dataset("A", data)
          dataset2.close()





          share|improve this answer









          $endgroup$



          You can always try using the h5py module in Python.



          import h5py

          # Load existing file
          filename = "myfile.hdf5"
          dataset = h5py.File(filename, "r")

          # Show keys
          [print(item) for item in dataset.items()]

          # Assuming that you want to select the first 10 rows of key "A"
          data = dataset["A"][:10]
          dataset.close()

          # Create the new dataset / file
          dataset2 = h5py.File("myfile2.hdf5", "w")
          dataset2.create_dataset("A", data)
          dataset2.close()






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 1 at 16:22









          pcko1pcko1

          1,681418




          1,681418











          • $begingroup$
            thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
            $endgroup$
            – atrlrgn
            Apr 2 at 8:40
















          • $begingroup$
            thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
            $endgroup$
            – atrlrgn
            Apr 2 at 8:40















          $begingroup$
          thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
          $endgroup$
          – atrlrgn
          Apr 2 at 8:40




          $begingroup$
          thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
          $endgroup$
          – atrlrgn
          Apr 2 at 8:40

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Data Science Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48362%2fextracting-data-and-saving-data-from-hdf5%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Adding axes to figuresAdding axes labels to LaTeX figuresLaTeX equivalent of ConTeXt buffersRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeNumerical conditional within tikz keys?adding axes to shapesAlign axes across subfiguresAdding figures with a certain orderLine up nested tikz enviroments or how to get rid of themAdding axes labels to LaTeX figures

          Tähtien Talli Jäsenet | Lähteet | NavigointivalikkoSuomen Hippos – Tähtien Talli

          Do these cracks on my tires look bad? The Next CEO of Stack OverflowDry rot tire should I replace?Having to replace tiresFishtailed so easily? Bad tires? ABS?Filling the tires with something other than air, to avoid puncture hassles?Used Michelin tires safe to install?Do these tyre cracks necessitate replacement?Rumbling noise: tires or mechanicalIs it possible to fix noisy feathered tires?Are bad winter tires still better than summer tires in winter?Torque converter failure - Related to replacing only 2 tires?Why use snow tires on all 4 wheels on 2-wheel-drive cars?