{"id":17153183,"url":"https://github.com/axect/grf_test","last_synced_at":"2025-10-07T02:44:23.275Z","repository":{"id":96228565,"uuid":"597935229","full_name":"Axect/GRF_test","owner":"Axect","description":"Generate Gaussian Random Fields","archived":false,"fork":false,"pushed_at":"2024-03-18T07:27:13.000Z","size":469,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T19:55:43.443Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Axect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-06T02:57:09.000Z","updated_at":"2024-03-18T07:48:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"75079051-5f5f-4501-8d53-13d7fefc8ff8","html_url":"https://github.com/Axect/GRF_test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Axect/GRF_test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axect%2FGRF_test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axect%2FGRF_test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axect%2FGRF_test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axect%2FGRF_test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Axect","download_url":"https://codeload.github.com/Axect/GRF_test/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axect%2FGRF_test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278710889,"owners_count":26032541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T21:45:31.004Z","updated_at":"2025-10-07T02:44:23.259Z","avatar_url":"https://github.com/Axect.png","language":"Rust","readme":"# Gaussian Random Fields (GRF) Generator\n\nThis Rust program generates Gaussian Random Fields (GRF) using the circulant embedding method. It allows you to specify the number of samples, nodes, and the kernel window size. The generated GRF is then plotted and saved as an image file.\n\n## Requirements\n\n- Rust programming language\n- rustfft library\n- peroxide library\n\n## Usage\n\nTo run the program, use the following command:\n\n```bash\ncargo run -- \u003cnum_samples\u003e \u003cnum_nodes\u003e \u003csigma\u003e\n```\n\n- `\u003cnum_samples\u003e`: The number of samples to generate.\n- `\u003cnum_nodes\u003e`: The number of nodes in each sample.\n- `\u003csigma\u003e`: The kernel window size.\n\n## Example\n\nHere's an example command to generate 4 samples with 100 nodes each and a kernel window size of 0.1:\n\n```bash\ncargo run --release -- 4 100 0.1\n```\n\n## Output\n\nThe program generates a plot of the Gaussian Random Fields and saves it as `plot.png` in the current directory.\n\n![Gaussian Random Fields Plot](plot.png)\n\n## Implementation Details\n\nThe program uses the circulant embedding method to generate Gaussian Random Fields efficiently. It leverages the Fast Fourier Transform (FFT) from the `rustfft` library to speed up the computations.\n\nThe main steps of the algorithm are:\n\n1. Generate the x-coordinates using the `linspace` function.\n2. For each sample, call the `grf` function to calculate the GRF values.\n3. Generate line styles and colors for each sample.\n4. Create a `Plot2D` object and insert the GRF values as images.\n5. Set the plot properties such as line styles, colors, labels, and style.\n6. Save the plot as `plot.png`.\n\nThe `grf` function implements the circulant embedding method to generate the GRF values. It uses the Stationary Gaussian Kernel defined by the `k` function.\n\n## References\n\n- Chan, Grace., _An Effective Method for Simulating Gaussian Random Fields_, Proceedings of the statistical Computing section. 1999.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxect%2Fgrf_test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxect%2Fgrf_test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxect%2Fgrf_test/lists"}