Hi @rkhayat,
This is currently a bug. You’re correct that the entire opticsGroup is not imported, but the _rlnOpticsGroup field should be. The fix for this will be released in the next version of cryoSPARC (v2.15.0)
First, navigate to cryosparc2_worker
$ cd cryosparc2_worker`
$ eval $(./bin/cryosparcw env)
$ python
> import cryosparc2_compute.dataset
> import cryosparc2_compute.common
> #load the dataset
> particle_dataset = dataset.Dataset().from_file(<path_to_particle_dataset>)
> #add missing fields (this example is for particle datasets)
> particle_dataset = common.create_missing_fields_in_dataset(particle_dataset, 'ctf', 'particle.ctf')
#set the exposure group id
> particle_dataset.data['ctf/exp_group_id'][:] = 2
Please also note the “Exposure Group Utilities” Tool, that will allow you to split these groups without having to use the CLI:
https://www.cryosparc.com/docs/tutorials/ctf-refinement#exposure-groups